Hi, appreciate your help <asp:TemplateField HeaderText="contactId"> <ItemTemplate> <asp:Label ID="lblcontactId" runat="server" Text='<%# Bind("contactId") %>'></asp:Label> </ItemTemplate> <EditItemTemplate> <asp:TextBox ID="txtcontactId" runat="server" Text='<%# Bind("contactId") %>'></asp:TextBox> </EditItemTemplate> </asp:TemplateField> public void GridView1_RowUpdating(Object sender, GridViewUpdateEventArgs e) { //Retrieve the table from the session object. DataTable dt = (DataTable)Session["dt"]; // a. Code GridViewRow gvr = GridView1.Rows[e.RowIndex]; string strContactId = (((Label)gvr.Cells[1].Controls[0]).Text).ToString() } I got this error Unable to cast object ...

Go to the complete details ...