How to check if the web page contains any string queries at the page load?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can determine if there are any values in the QueryString by checking its count:
That said if you are trying to prevent a page from erroring because you don’t want to access a value that is not there I recommend wrapping query parms up in page properties and returning safe values from the property.
As an example