我该如何在VB.NET中检查查询字符串是否有参数?我很难将C#代码转换成VB。
我特别想知道如何确定是否存在一个没有值/没有键的参数。
伪代码:
If Request.QueryString.Contains("test") Then
' ...
End If
示例:
http://example.com/mypage.aspx?test
http://example.com/mypage.aspx?test=1
http://example.com/mypage.aspx?someparam=1&test&anotherparam=2
澄清一下,我不在乎test
是否有值。我只想知道它是否在查询字符串中。