PC Review


Reply
Thread Tools Rate Thread

building a URL dynamically and URLEncode?

 
 
DC Gringo
Guest
Posts: n/a
 
      23rd Nov 2004
I am having trouble building a URL the serves up an image
dynamically...something involving the & separating my URL parameters. If I
put the same URL in with & instead of the code-generated &, everything
is fine. I've tried URLEncode and URLDecode in both directions and no dice.
hELP!

'declare and build the URL
Dim theURL As String = ""
theURL = sServerName & _
sPath & _
"servicename=" & sServiceName & _
"&a=" & sRequest & _
"&b=" & sWidth & _
"&c=" & sHeight & _
"&d=" & sFormat & _
"&e=" & sLayers & _
"&f=" & sWmtVer & _
"&g=" & sSrs & _
"&h=" & sBbox

'Set the image's url and alt tag
imgWrsiHome.ImageUrl = HttpUtility.UrlDecode(theURL)


http://theserver.com?servicename=r4&...G:4326&h=5

_____
DC G


 
Reply With Quote
 
 
 
 
=?Utf-8?B?SWFuIFN1dHRsZQ==?=
Guest
Posts: n/a
 
      23rd Nov 2004
DC Gringo,

&amp isn't URL Encoding, it is HTML Encoding. Somehow you are encoding it
that way. You can always attempt a URLDecode on the receiving end in case
anything is automatically encoded. I don't see in your code there how that
is happening. Can you post additional code that shows the entire link being
created and displayed?

Thanks,
Ian Suttle
http://www.IanSuttle.com

"DC Gringo" wrote:

> I am having trouble building a URL the serves up an image
> dynamically...something involving the & separating my URL parameters. If I
> put the same URL in with & instead of the code-generated &, everything
> is fine. I've tried URLEncode and URLDecode in both directions and no dice.
> hELP!
>
> 'declare and build the URL
> Dim theURL As String = ""
> theURL = sServerName & _
> sPath & _
> "servicename=" & sServiceName & _
> "&a=" & sRequest & _
> "&b=" & sWidth & _
> "&c=" & sHeight & _
> "&d=" & sFormat & _
> "&e=" & sLayers & _
> "&f=" & sWmtVer & _
> "&g=" & sSrs & _
> "&h=" & sBbox
>
> 'Set the image's url and alt tag
> imgWrsiHome.ImageUrl = HttpUtility.UrlDecode(theURL)
>
>
> http://theserver.com?servicename=r4&...=EPSG:4326&h=5
>
> _____
> DC G
>
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamically Building SQL Statment Me, Myself, and I Microsoft C# .NET 1 24th Feb 2005 10:37 AM
building a URL dynamically and URLEncode? DC Gringo Microsoft ASP .NET 1 23rd Nov 2004 05:01 AM
building a URL dynamically and URLEncode? DC Gringo Microsoft Dot NET 1 23rd Nov 2004 05:01 AM
Building a Presentation Dynamically MDS Microsoft Powerpoint 1 21st Sep 2004 12:21 PM
Difference between System.Web.HttpUtility.UrlEncode and Server.UrlEncode? Andreas Klemt Microsoft ASP .NET 4 22nd Jan 2004 01:35 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:52 AM.