Error handling when inserting a null value, asp.net c# -
i have webpage built in asp.net c#. user create new record in db table. there there 2 input fields, text , score. text cannot null value if user doesn't input text onsubmit, page errors out. want throw in simple error handling code in code behind page. i've tried including if/else on_inserted method ran java script errors. apprieciated. thanks.
aspx page -----------------
<edititemtemplate> <customeditors:editorwithcustombuttons_1 runat="server" id="editor1" content='<%# bind("usertext") %>' /> </edititemtemplate> <insertitemtemplate> <customeditors:editorwithcustombuttons_1 runat="server" id="editor1" content='<%# bind("usertext") %>' /> </insertitemtemplate>
why not use requiredfieldvalidator validator? works inside grid
Comments
Post a Comment