using QueryString Property using VB.net

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • anoop

    #1

    using QueryString Property using VB.net

    Hello,
    I want to write the VB code to extract value from QueryString
    property using ASP.Net, the following code should be written in The Form's
    Action property.


    Dim loop1, loop2 As Integer
    Dim arr1(), arr2() As String
    Dim coll As NameValueCollec tion

    ' Load Form variables into NameValueCollec tion variable.
    coll=Request.Qu eryString
    ' Get names of all keys into a string array.
    arr1 = coll.AllKeys
    For loop1 = 0 To arr1.GetUpperBo und(0)
    Response.Write( "Key: " & Server.HtmlEnco de(arr1(loop1)) & "<br>")
    ' Get all values under this key.
    arr2 = coll.GetValues( loop1)
    For loop2 = 0 To arr2.GetUpperBo und(0)
    Response.Write( "Value " & CStr(loop2) & ": " &
    Server.HtmlEnco de(arr2(loop2)) & "<br><br>")
    Next loop2
    Next loop1


    How do I go about.Please hepl me, I am new to .Net.

    Thank you



Working...