How to iterate through a dataset and show each record on the web page
-
Hello All How can I perform goint to Next,Previous,First and last record of a dataset. All of these events will be fired on click of the respective button. I know that i have to use SqlDataReader but unable to implement the same. Any Code will be helpful for me. Ajay Kumar
-
Hello All How can I perform goint to Next,Previous,First and last record of a dataset. All of these events will be fired on click of the respective button. I know that i have to use SqlDataReader but unable to implement the same. Any Code will be helpful for me. Ajay Kumar
MissionSuccess wrote:
I know that i have to use SqlDataReader
Not true. There are numerous ways to define a data source. You can set up the GridView, at least, to do this for you, but I prefer to write controls for the links and write a stored proc that takes a page number and count, and handle it myself.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
MissionSuccess wrote:
I know that i have to use SqlDataReader
Not true. There are numerous ways to define a data source. You can set up the GridView, at least, to do this for you, but I prefer to write controls for the links and write a stored proc that takes a page number and count, and handle it myself.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
Agreed SqldataReader is forward only.... But how can i achieve this...without any grid I have a no of data for a record so i am not using datagrid. I am showing it in different textboxes and dropdowns. On the click of next or previous button the respected textboxes and dropdowns shd be filled automatically with the correct data. Ajay Kumar