Posted on: 10/17/2014 7:50:55 PM | Views : 431

I want to do some coding that will determine of the querystring has proper values.
Most of my querystrings are integers, CustomerID= 1234
I want to write a little code where I can try to determine if the results of the querystring are numbers only, and if anything else to redirect to a specific page, this is what I have now and it works fine as long as the querystring is correct, but if it is not I get an error, instead of the error I want to redirect.
if (Request.QueryString["InvoiceID"] == null) { Response.Redirect("~/Administration/Customers/Billing/SalesOrders/Manage.aspx"); } else { _InvoiceID = Convert.ToInt64(Request.QueryString["InvoiceID"]); }

Go to the complete details ...