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
How to Require a Textbox Be Completed When “Other” is Selected in a CheckBoxList
The Situation: You have a CheckBoxList with an "Other (please specify)" option at the end. If the visitor selects "Other", you want to require that they fill out the "Other" textbox as shown here: You will need to use a Custom Validator attached to the “Other” text box. ASPX file: Client Validation The client validation … Continue reading How to Require a Textbox Be Completed When “Other” is Selected in a CheckBoxList