Id Email Password Name 1 ali@yahoo.com 1234 ali is this row at position 0? 2 usman@yahoo.com 1234 usman is this row at position 1 ?
if (!Page.IsPostBack) { GetUserDetails(int.Parse(Request.QueryString["Id"].ToString())); } public void GetUserDetails(int mu) { string getUserDetail ="Select Id,Email,Name,Country FROM [User] where Id="+ mu+"; dt = dbClass.ConnectDataBaseReturnDT(getUserDetail); if(dt.Rows.Count>0)//what this line do? { Label1.text=datatable.Rows[0]["Name"].Tostring(); // i use for reterive the data from table User 1 ali@yahoo.com 1234 ali Label1.Text=datable.Rows[1]["Name"].Tostring(); //i use for retrive the data from table User 2 usman@yahoo.com 1234 usman // ERRRO COMES THERE IS NO ROW AT POSITION 1 } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)