Posted on: 6/4/2014 9:06:34 PM | Views : 417

In my FormView, I have a dropdownlist and First item I add "Select" and if I pick up an item from ddl, it does not have errors when I click "insert" button to add a record but if I do not do anything and just click "insert' after page load, it has an error
"input string was not in a correct format". I know it is fromthe dropdownlist. My question is :
is it a way to avoid this error?
<asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource1" DataTextField="ItemNo" DataValueField="ItemNo" align="left" ToolTip="item No" AppendDataBoundItems="true" AutoPostBack="True" SelectedValue='<%# Bind("ItemNo") %>' onselectedindexchanged="DropDownList1_SelectedIndexChanged"> <asp:ListItem Value="(Select)">(Select)</asp:ListItem></asp:DropDo ...

Go to the complete details ...