views:

24

answers:

1

I need to send the follow querystring:

http://prod.intranet.siemens.com.br/drvs/index.aspx?page=2&pag=4&varpatch=%20C:\Documents%20and%20Settings\OPE253\My%20Documents\Ca$@#!

Then i try to assing this to a string,but .NET break string at

   http://prod.intranet.siemens.com.br/drvs/index.aspx?page=2&pag=4&varpatch=%20C:\Documents%20and%20Settings\OPE253\My%20Documents\Ca$@

'#" do not appears in querystring

Any ideas?

+4  A: 

No, because "#" is a reserved character. It's used to link to a specific location in a web page:

http://en.wikipedia.org/wiki/HTML_anchor#Overview

So browsers split the URL at the "#".

You'll need to encode the "#" as "%23"

You need to use String.Replace:

Dim outputURL As String = inputURL.Replace("#", "%23")
ChrisF
How do i encode it?