I wish this help you System.Web.UI.HtmlControls.HtmlGenericControl is a correct cast for ul. Besides, you do not even need to cast to HtmlGenericControl, because Visible is a property of System.Web.UI.Control from which all web controls inherited.
I hope this helps you . I am trying to update a database using the GridView edit, update CommandField. I have two editable fields which are displayed as text boxes when in edit mode. When clicking submit, I am trying to put the text box values into variables to work with, but I am unable to access them. The two column names are "EOR" and "CategoryName". I have found several suggestions on other forums to try something like: , I finally found a way that works: