Hi,
I hope somone can help me with this problem.
I want to break a querystring into name value pairs.
For example I have a querystring like
mypage.asp?Name=Scott&address=someplace&Phone=12345&zip=456
and I want to break it up so that the result is a list like
Name=Scott
Address=Someplace
Phone=12345
Zip=456
or better yet, just
Scott
Someplace
12345
456
So far I have the following code, which for the querystring above would show a message saying '4 Pairs'
########
Private Sub Command1_Click()
Dim iLen As Integer
Dim strWork As String
Dim ptr As Integer
Dim strET As String
Dim iNameValueCount As Integer
strET = Me.Text1.Text
For ptr = 1 To Len(strET)
strWork = Mid(strET, ptr, 1)
If strWork = "&" Or strWork = "?" Then iNameValueCount = iNameValueCount + 1
Next
MsgBox iNameValueCount & " pairs"
End Sub
########
Can anyone help me continue from here please?
I hope somone can help me with this problem.
I want to break a querystring into name value pairs.
For example I have a querystring like
mypage.asp?Name=Scott&address=someplace&Phone=12345&zip=456
and I want to break it up so that the result is a list like
Name=Scott
Address=Someplace
Phone=12345
Zip=456
or better yet, just
Scott
Someplace
12345
456
So far I have the following code, which for the querystring above would show a message saying '4 Pairs'
########
Private Sub Command1_Click()
Dim iLen As Integer
Dim strWork As String
Dim ptr As Integer
Dim strET As String
Dim iNameValueCount As Integer
strET = Me.Text1.Text
For ptr = 1 To Len(strET)
strWork = Mid(strET, ptr, 1)
If strWork = "&" Or strWork = "?" Then iNameValueCount = iNameValueCount + 1
Next
MsgBox iNameValueCount & " pairs"
End Sub
########
Can anyone help me continue from here please?