Hi all
I am using sqldatareader to read data from sqldatabase.
The data is being shown on web forms with tabcontainer and tabs.
The scenario is
I have three rows of data for a client.I want to read row by row data on a button click event.I used while loop and a sqldatareader, but this reads all rows at once and will display result only for the last row on my web form
----
------
----
---
SqlDataReader reader=null;
reader=cmd.ExecuteReader();
while(reader.Read())
{
txtboxName.text=reader["name"].ToString();
---
---
}
protected void button_click(Object sender,EventsArgs e)
{
//I want to read row data in the click event of a button
}