The Situation: You need to get the value of one of the columns in the row you are deleting in a GridView to do some processing before the row is deleted. A Solution: When using the RowDeleting method, you cannot use e.Row.Cells[1].Controls[1] to get the control in that cell like you can in the RowCreated … Continue reading How to get the value from a GridView column on RowDeleting
GridView
How To Avoid Null Reference Exceptions in an ASPX File When Dynamically Populating a GridView or ListView Control
The situation: You have a GridView control with a TemplateField in your ASPX page that is dynamically populated from a database. You of course use an Eval() statement to dynamically populate the TemplateField, but the db field is nullable (and in fact contains a null value), and when you run the page, you get an … Continue reading How To Avoid Null Reference Exceptions in an ASPX File When Dynamically Populating a GridView or ListView Control