CodePudding user response:
Can expand an attribute that is used to store the old valueCodePudding user response:
Yes, similar to (here only handwritten example, there may be grammar mistakes, it is good to understand)& lt; Asp: Text ID="txtABC Text='& lt; % # Bind (" field_a ") % & gt; 'the old value=Text=' & lt; % # Bind (" field_a ") % & gt; '.../>double bind, through the custom attributes bind the old value (formatted as text type), then you can read the attribute value, such as
protected void GridView1_RowUpdating (object sender, GridViewUpdateEventArgs e)can use custom attributes to save the business meaning of field information,
{
Var TXT=(TextBox) e.I tem. FindControl (" txtABC ");
String v=TXT. Attribute [] "old value";
.
}
CodePudding user response:
& lt; Asp: TextBox ID="name" runat="server" Text='& lt; % # Bind (" name ") % & gt; '& gt;
Using a hidden value, save the old values, update more than txtbox values are in line,