Wednesday, June 29, 2022

Gridview OnRowUpdating event get the value of label and textbox - ASP.NET

aspx page code
<asp:GridView ID="GridViewAdmin_Users" runat="server" DataKeyNames="OldPassword, OldSalt">

aspx.cs page code

 string orginial_password = GridViewAdmin_Users.DataKeys[e.RowIndex].Values[0];

string original_salt = GridViewAdmin_Users.DataKeys[e.RowIndex].Values[1];


 var tpRemarks = grd_Invoice.Rows[e.RowIndex].FindControl("txtTPRemarks") as TextBox;


-------------------

reference:- https://stackoverflow.com/questions/43634813/get-old-value-of-label-inside-gridview-during-rowupdating-asp-net-gridview-c-s


No comments:

Post a Comment