Thursday, August 1, 2013

How to Check query String is exist or not


Imports System.Collections.Specialized

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim n As NameValueCollection = Request.QueryString
' See if any query string exists
 If n.HasKeys() Then
            Dim k As String = n.GetKey(0)
            Dim v As String = n.[Get](0)
            Response.Write(v)
            Response.Write(k)
 End If
End Sub

No comments:

Post a Comment