Solved

Navigating through database records in web app

Posted on 2004-08-24
2
255 Views
Last Modified: 2010-04-15
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
0
Comment
Question by:RichardFox
  • 2
2 Comments
 
LVL 1

Accepted Solution

by:
chmohan earned 500 total points
ID: 11885920
use a   datatable  and navigate the datarows depending on whcih button you click:)
why dont u use  2  listboxes,one to load all the rows,and when he click the button navigate to the record:) the listbox will have a selectedindex and item array,you can navigate using those





0
 
LVL 1

Expert Comment

by:chmohan
ID: 11886275
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now