H
Howard
A non-integer value is entered as student id
/grades.aspx?studentid=1283128sdf
Input string was not in a correct format.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.FormatException: Input string was not in a correct
format.
In aspx file
<asp:ObjectDataSource ID="object1" runat="server"
SelectMethod="GetScores" TypeName="GradeBook">
<SelectParameters><asp:QueryStringParameter Name="studentId"
Type="Int32" QueryStringField="studentid" DefaultValue="0"
/></SelectParameters>
</asp:ObjectDataSource>
The problem is I can't use try catch in the .aspx file. How can I solve this
problem
/grades.aspx?studentid=1283128sdf
Input string was not in a correct format.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.FormatException: Input string was not in a correct
format.
In aspx file
<asp:ObjectDataSource ID="object1" runat="server"
SelectMethod="GetScores" TypeName="GradeBook">
<SelectParameters><asp:QueryStringParameter Name="studentId"
Type="Int32" QueryStringField="studentid" DefaultValue="0"
/></SelectParameters>
</asp:ObjectDataSource>
The problem is I can't use try catch in the .aspx file. How can I solve this
problem