RichardFox
asked on
Navigating through database records in web app
I have a local database, and already connect to it and display records in a list box
String strConn = ConfigurationSettings.AppS ettings["T ESTDMS"];
String compSql = "SELECT DISTINCT companyname from company ORDER BY companyname";
SqlConnection oConn = new SqlConnection(strConn);
SqlCommand oCmd = new SqlCommand(compSql, oConn);
oConn.Open();
companyLB.DataSource = oCmd.ExecuteReader(); // companyLB is a listbox
companyLB.DataTextField = "companyname";
companyLB.DataValueField = "companyname";
companyLB.DataBind();
oConn.Close();
I have another table, investEvent, and I want to provide a way of browsing this table, READ-ONLY, with '<<', '<', '>', '>>' buttons. Updating, deleting, and inserting is NOT necessary. I am a little confused by the many data controls and am not sure the simplest, cleanest way to do this. Can I get some suggestions, pointer to articles? Thanks
String strConn = ConfigurationSettings.AppS
String compSql = "SELECT DISTINCT companyname from company ORDER BY companyname";
SqlConnection oConn = new SqlConnection(strConn);
SqlCommand oCmd = new SqlCommand(compSql, oConn);
oConn.Open();
companyLB.DataSource = oCmd.ExecuteReader(); // companyLB is a listbox
companyLB.DataTextField = "companyname";
companyLB.DataValueField = "companyname";
companyLB.DataBind();
oConn.Close();
I have another table, investEvent, and I want to provide a way of browsing this table, READ-ONLY, with '<<', '<', '>', '>>' buttons. Updating, deleting, and inserting is NOT necessary. I am a little confused by the many data controls and am not sure the simplest, cleanest way to do this. Can I get some suggestions, pointer to articles? Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.c-sharpcorner.com/Code/2002/July/DataTransferLists.asp