Hi,
In my web form I'm authenticating users. If the userIdLocation is null I do not want it to execute the reader because I know that it will throw an unhandled exception error because when the stored procedure looks for @schoolID, nothing is there. How would I go about telling it if userIdLocation is null, not to execute the reader? The reason for this is if the userIdLocation doesn't exist I want them to be able to manually enter this information.
I'm new to .NET so bare with me please. Any help is appreciated.
1 protected void Page_Load(object sender, EventArgs e)
2 {
3 Auth MyAuth = new Auth();
4 string userIdLocation = "";
5 SqlConnection _sqlConn = Go to the complete details ...