Jan 18, 2016 06:50 AM|Klein Zhang|LINK
i have to store click status as "clicked" after use it as in if block in edit row but the value setting null
markfitzme say, the variable called btnStatus not a global variable, It's just a class field. In ASP.NET, a static fields lifetime is for the app domain (note that this differs a bit for generic types), so Static Variables are global. You could refer to
the static variable instead of the field and use it to storage the data.
public static string btnStatus = string.Empty;
Besides, I'd recommend using the server Session to storage the data.
if(Session["btnStatus"] == null)