Forums

This topic is locked

tweeking dynamic links in NN4

Posted 28 Nov 2001 19:19:42
1
has voted
28 Nov 2001 19:19:42 Dawn Maestas posted:
Ok, I've got URLEncode finally working for my dynamic links in NN4. But when I click on the links, it's producing funky results.

The ASP code is:
&lt;td&gt;&lt;img src="../images/bullet_closed.gif" width="15" height="10"&gt; &lt;a href="&lt;%= Server.URLEncode((rsMovies.Fields.Item("Link".Value)) %&gt;"&gt;&lt;span class="smallfont"&gt;&lt;%=(rsMovies.Fields.Item("MovieID".Value)%&gt;&lt;/span&gt;&lt;/a&gt; (&lt;span class="smallfont"&gt;&lt;%=(rsMovies.Fields.Item("FileSize".Value)%&gt;&lt;/span&gt<img src=../images/dmxzone/forum/icon_smile_wink.gif border=0 align=middle>&lt;/td&gt;

When I view it in NN4 it does the following things for different file types. Should I be using a different Encode?

Before encoding, an EXE file looks like this: /movies/corporate/ipomov.exe
After encoding, it looks like this: %2E%2E%2Fmovies%2Fcorporate%2Fipomov%2Eexe
When clicked on, it tries to save the file as HTML

Before encoding, an AVI file looks like this: /movies/corporate/gonnawin.avi
After encoding, it looks like this: %2E%2E%2Fmovies%2Fcorporate%2Fgonnawin%2Eavi
When clicked on, it says it doesn't recognize the file format

Before encoding, an HTML file looks like this: archive.htm" target="mainframe"
After encoding, it looks like this: archive%2Ehtm%22+target%3D%22mainFrame"
When clicked on, it says the file is missing

Before encoding, an MPEG file looks like this: /movies/mpeg/clamp.mpg
After encoding, it looks like this: %2E%2E%2Fmovies%2Fmpeg%2Fclamp%2Empg
When clicked on, it WORKS and plays the movie

Dawn Maestas
OS: Win2000
Server: IIS, Win NT
UD: 4.0
Code: ASP
DB: Access 2000

Replies

Replied 29 Nov 2001 18:53:12
29 Nov 2001 18:53:12 Dawn Maestas replied:
Ok, I finally fixed the problem by combining a couple of suggestions. Basically the way to make it work it is to use "Server.URLPathEncode". NOT "Server.URLEncode".


Dawn Maestas
OS: Win2000
Server: IIS, Win NT
UD: 4.0
Code: ASP
DB: Access 2000
Replied 06 Nov 2002 12:43:07
06 Nov 2002 12:43:07 Stephen Davidson replied:
man you have just solved my problem after 6 hours of trying to do worka rounds..thanks.

SMD

Reply to this topic