Link to home
Start Free TrialLog in
Avatar of RichardFox
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.AppSettings["TESTDMS"];
                  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
Avatar of chmohan
chmohan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chmohan
chmohan