No... you & is legal. Check for other:
Example:
Dim uriString As String = "http://www.contoso.com/search"
' Create a new WebClient instance.
Dim myWebClient As New WebClient()
' Create a new NameValueCollec tion instance to hold the QueryString parameters and values.
Dim myQueryStringCo llection As New NameValueCollec tion()
Console.Write(( "Enter the word(s), separated by space characters, to search for in " + uriString + ": "))
' Read user input phrase to search in uriString.
Dim searchPhrase As String = Console.ReadLin e()
' Append necessary parameter/value pairs to the name/value container.
' as QueryString = "?q=Microsoft&b tnG=Google+Sear ch".
If searchPhrase.Le ngth > 1 Then
'Assign the user-defined search phrase.
myQueryStringCo llection.Add("q ", searchPhrase)
' If error, default to search 'Microsoft'.
Else
myQueryStringCo llection.Add("q ", "Microsoft" )
End If
' Assign auxilliary parameters required for the search.
myQueryStringCo llection.Add("b tnG", "Google" + ChrW(43) + "Search")
Console.WriteLi ne(("Searching " + uriString + " ......."))
' Attach QueryString to the WebClient.
myWebClient.Que ryString = myQueryStringCo llection
' Download the search results Web page into 'searchresult.h tm' for inspection.
myWebClient.Dow nloadFile(uriSt ring, "searchresult.h tm")
Console.WriteLi ne((ControlChar s.Cr + "Download of " + uriString + " was successful. Please see 'searchresult.h tm' for results."))
"DaveF" <df*****@geodec isions.com> wrote in message news:OX******** ******@TK2MSFTN GP10.phx.gbl...
I am looping threw the querySting with:
foreach (string name in Request.QuerySt ring)
I have a problem with a '&' being in one of the values. How do I deal with
this?
page.asp?theVal =2&theVal2=aa& e overdue
--
David Fetrow
Helixpoint LLC.
http://www.helixpoint.com
da***@helixpoin t.com