Gautam Buddha Temple Varanasi,Varanasi - Buddhist Pilgrimage

Friday, September 10, 2010

Onclick Gridview Select button fill all the data to textbox.

 Onclick Gridview Select button fill all the data to textbox.  
 All the textbox out of gridview.  
 protected void ImgSelect_Click(object sender, ImageClickEventArgs e)  
 {  
      ImageButton aspSender = sender as ImageButton;  
      Label Id = aspSender.FindControl("lblContId") as Label;  
      hdnId.Value = Id.Text;  
      DataSet dsContact = new DataSet();  
      dsContact = SqlHelper.ExecuteDataset(connectionString, "usp_GetContact", Convert.ToInt32(Id.Text.Trim()), EmpId, "S");  
      if (dsContact.Tables[0].Rows.Count != 0)  
      {  
           txtName.Text = dsContact.Tables[0].Rows[0]["Name"].ToString();  
           ddlRelation.SelectedValue = dsContact.Tables[0].Rows[0]["RelId"].ToString();   
           txtAddress.Text = dsContact.Tables[0].Rows[0]["Address"].ToString();  
      }  
 }  

1 comment:

  1. This is an amazing blog,it gives very helpful messages to us.Besides that Wisen has established as Best Dot Net Training in Chennai. or learn thru ASP.NET Online Training . Nowadays Dot Net has tons of job opportunities on various vertical industry.

    ReplyDelete