Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP.Net 20 Data Navigation on a form 1

Status
Not open for further replies.

jlitondo

MIS
Jun 27, 2000
175
US
I am new to .Net and I have a webform that will be used for adding new records and editing existing ones. I would like the page to display one record at a time, which it is currently doing but is there a way to page through these records by way of clicking a Next or Previous button?
I tried searching my toolbox for a data navigation control but was unsuccesfull. Thanks.

 
What are you using to display these records?


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
I am using textboxes and dropdown lists to display the fields of each record.

 
OK, if you use a repeater to organise those textboxes and dropdownlists, you could bind them to a particular field in a DataSource. Then, you can use a PagedDataSource to limit the repeater to only show one record at a time. Have a look at this article for more info:


Alternatively, if you know what the next record will be (for example, if your current record has an id of 1 and the next one is 2) then you could simply create your own Back/Next buttons and load the relevant record.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.
 
Thanks ca8msm. I did it the "manual" way and sorted my records by the p/k in the dataset, then updated a text box on my page with the current row position with + or -1, and then took this value and passed it to a custom function as the row to retrieve from the dataset. Works great.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top