D
DC Gringo
I am having a bear of a time with setting a URL query string as a text value
in a dropdownlist and Server.URLEncode does not seem to do its job.
theFullLink = theLinkPrefix & theImageryTypeTrimmed &
Server.URLEncode("&f=")
ddlMyDropDownList.Items.Add(New ListItem("MyTextValue", theFullLink & "af"))
Which puts out the following HTML:
<option value="~/folder/page.aspx?param1=value1%26f%3daf">-
Afghanistan</option>
If I leave off the Server.URLEncode() i get:
<option value="~/folder/page.aspx?param1=value1&f=af">-
Afghanistan</option>
Help!
_____
DC G
in a dropdownlist and Server.URLEncode does not seem to do its job.
theFullLink = theLinkPrefix & theImageryTypeTrimmed &
Server.URLEncode("&f=")
ddlMyDropDownList.Items.Add(New ListItem("MyTextValue", theFullLink & "af"))
Which puts out the following HTML:
<option value="~/folder/page.aspx?param1=value1%26f%3daf">-
Afghanistan</option>
If I leave off the Server.URLEncode() i get:
<option value="~/folder/page.aspx?param1=value1&f=af">-
Afghanistan</option>
Help!
_____
DC G