ASP.net 2.0 Concatenating a VarChar and a String and getting extra characters???

Here is my code:
READERWEBSTORE(0) IS A VARCHAR!!!
My ASP.net 2.0 code:
            Dim readerWebStore As SqlDataReader = commandGetWebStore.ExecuteReader()
            While (readerWebStore.Read())
                paramGetWebStore = readerWebStore(0).ToString
            End While
            oSQLGetWebStore.Close()
            paramGetWebStore = "https://www.paypal.com/cgi-bin/webscr?cmd=_cart&business=" & paramGetWebStore & "&display=1"
            imgCart.OnClientClick = paramGetWebStore
''''''''''''''''''''''''''''''''''
Now, I'm trying to set the cart to something like this:
https://www.paypal.com/cgi-bin/webscr?cmd=_cart&me@myemailadress.com&display=1
but I'm  getting this:
https://www.paypal.com/cgi-bin/webscr?cmd=_cart&me@myemailadress.com&display=1;
Now, if we compare the two, we can see that a "amp;" was added twice and a ";" at the end of the string. This seems like something simple I should know, but I can't think of why this happens. Please help, thanks; Chris.
jumpstart0321Asked:
Who is Participating?
 
ArlowinConnect With a Mentor Commented:
well, the easy way out would be, right after:
paramGetWebStore = "https://www.paypal.com/cgi-bin/webscr?cmd=_cart&business=" & paramGetWebStore & "&display=1"

do this:
paramGetWebStore = replace(paramGetWebStore,"&","&")
0
 
zkeownCommented:
Then & for ampersand is normal... to have valid (X)HTML they have to be encoded that way.

I'm at a loss on the ; though...
0
 
jumpstart0321Author Commented:
I cannot have the &amp in there though... You can actually try the two different links in your browser to see that the &amp screws up the url:
https://www.paypal.com/cgi-bin/webscr?cmd=_cart&me@myemailadress.com&display=1
works
and
https://www.paypal.com/cgi-bin/webscr?cmd=_cart&me@myemailadress.com&display=1
doesn't work.
Perhapys asp.net automatically converts the "&" to "&amp" when I assign the string to "imgCart.OnClientClick"???
0
All Courses

From novice to tech pro — start learning today.