PDA

Click to See Complete Forum and Search --> : looking for existence of Querystring [Resolved]


drpcken
Jan 13th, 2005, 02:49 PM
I'm trying to write a way to check for the existance of a querystring, not its value.

I was thinking something like

If Request.Querystring("Param") is Nothing then
end if

I'm not worried if it has a value or not, I just wanna check to see if its there or not.

Thanks!

token
Jan 13th, 2005, 03:04 PM
You could do:

If Request.Item("Param") is Nothing then
End IF

That is essentially the same thing.

Patch21
Jan 13th, 2005, 03:13 PM
I suppose you could also just count the collection if you were only passing one querystring.



Dim Count As Integer = Request.QueryString.Count

if Count = 0 then
end if

drpcken
Jan 13th, 2005, 04:14 PM
Thanks for the suggestions guys, Token's worked perfectly.