Help me in Query string
-
hi all, I am developing a web application using asp.net 2.0 (VB). my current page's URL some times comes with query string some times doesn't comes with query string. It is based on some status. I need to check My URL, whether its contain any query string or not. If so i have to do some action based on the value. else different kind of action will take place. Now how can i find out My URL contains the query string... help me out to solve this problem. Thanks in advance Senthilraj K
-
hi all, I am developing a web application using asp.net 2.0 (VB). my current page's URL some times comes with query string some times doesn't comes with query string. It is based on some status. I need to check My URL, whether its contain any query string or not. If so i have to do some action based on the value. else different kind of action will take place. Now how can i find out My URL contains the query string... help me out to solve this problem. Thanks in advance Senthilraj K
Check out the Request object. If your url is: www.foo.com?myparam=something Dim myvalue as string = "defaultvalue" If Not Request("myparam") Is Nothing Then myvalue = Request("myparam") End If myvalue should now be "something".
- S 50 cups of coffee and you know it's on!
-
hi all, I am developing a web application using asp.net 2.0 (VB). my current page's URL some times comes with query string some times doesn't comes with query string. It is based on some status. I need to check My URL, whether its contain any query string or not. If so i have to do some action based on the value. else different kind of action will take place. Now how can i find out My URL contains the query string... help me out to solve this problem. Thanks in advance Senthilraj K
Do you know the querystring variable name ? IF yes then go with previous poster suggested method. If no, you need to take
Requst.RawUrl
and use some regular expressions to find url contains querystring.