Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > <A href= links dont always render properly on my .aspx pages

Reply
Thread Tools

<A href= links dont always render properly on my .aspx pages

 
 
Brian Watkins
Guest
Posts: n/a
 
      12-31-2003
Hello All,

I have a a file display page that contains two frames. In the left
frame is a tree view that lists a directory and all its subfolders. Each
node in the left frames tree is a link that when clicked displays links to
all the files in the right frame for the folder clicked. The problem I
have is that some of the links don't work and some do. It seems like the <A
href only renders when it wants to. Has anyone seen this before? Thanks
in advance!


 
Reply With Quote
 
 
 
 
Patrick Steele [MVP]
Guest
Posts: n/a
 
      12-31-2003
In article <O8POX#(E-Mail Removed)>, http://www.velocityreviews.com/forums/(E-Mail Removed)
says...
> Hello All,
>
> I have a a file display page that contains two frames. In the left
> frame is a tree view that lists a directory and all its subfolders. Each
> node in the left frames tree is a link that when clicked displays links to
> all the files in the right frame for the folder clicked. The problem I
> have is that some of the links don't work and some do. It seems like the <A
> href only renders when it wants to. Has anyone seen this before? Thanks
> in advance!


Perhaps the <A> tags are being constructed properly. Can you show us a
sample of the rendered HTML?

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele
 
Reply With Quote
 
 
 
 
Brian Watkins
Guest
Posts: n/a
 
      12-31-2003
Patrick,

Thanks for your response!
Here is the HTML output:

1 <Table bgColor=000066 width=100%>
2 <tr>
3 <td>
4 <table bgColor=FFFFFF align=left width=100% cellpadding=1
cellspacing=1>
5 <tr>
6 <th width=50%><b><FONT face='Times New Roman'>Name</th><th
align='center' width=6%><b><FONT face='Times New Roman'>Size</th>
7 <th align='center' width=23%><b><FONT face='Times New
Roman'>Last Modified</th>
8 <th align='center' width=23%><b><FONT face='Times New
Roman'>Date Created</th>
9 </tr>
10 <tr bgcolor='#FFFFFF'>
11 <td><a
href='ShowFiles.aspx?Path=http://intranet/Documents/HR/Benefit SPDs and
Documents' >Benefit SPDs and Documents</a></td>
12 </tr>
13 <tr bgcolor='#FFFFFF'>
14 <td><a
href='ShowFiles.aspx?Path=http://intranet/Documents/HR/Employee Handbook'
>Employee Handbook</a></td>

15 </tr>
16 <tr bgcolor='#FFFFFF'>
17 <td><a
href='ShowFiles.aspx?Path=http://intranet/Documents/HR/Holiday Schedules'
>Holiday Schedules</a></td>

18 </tr>
19 <tr bgcolor='#FFFFFF'>
20 <td><a
href='ShowFiles.aspx?Path=http://intranet/Documents/HR/HR Forms' >HR
Forms</a></td>
21 </tr>
22 <tr bgcolor='#FFFFFF'>
23 <td><a
href='ShowFiles.aspx?Path=http://intranet/Documents/HR/Mgrs Policy and
Procedure</a></td>
24 </tr>
25 </table>
26 </td>
27 </tr>
28 </table>


The links on lines 11, 14, and 17 didn't work( in this case), but the links
on lines 20 and 23 work fine. I am using the response.write method within
a function called by the page_load subroutine.

The links that dont work look like links (ie undelined) but can't be clicked
on.


 
Reply With Quote
 
Patrick Steele [MVP]
Guest
Posts: n/a
 
      12-31-2003
In article <(E-Mail Removed)>, (E-Mail Removed)
says...
> 11 <td><a
> href='ShowFiles.aspx?Path=http://intranet/Documents/HR/Benefit SPDs and
> Documents' >Benefit SPDs and Documents</a></td>


The 'Path' parameter is not properly HTML encoded (it contains spaces
and slashes). You need to use HttpUtility.HtmlEncode to make sure the
parameter data is properly formatted to HTML.

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele
 
Reply With Quote
 
Brian Watkins
Guest
Posts: n/a
 
      01-05-2004
Patrick,

Well if I don't know how to properly format a <A> by now I'm in trouble.
Its funny because all the links are response.write to the page. This
behaviour only occurs if I try to fill both frames with links at the same
time. The exact code works if I fill the left frame links and fill the
right frame based on a left frame click. But if I attempt to run both pages
at the same time it doesn't work. Only some of the <A> tags render
properly. Its almost as if the pages dont finish loading.


 
Reply With Quote
 
Patrick Steele [MVP]
Guest
Posts: n/a
 
      01-06-2004
In article <(E-Mail Removed)>, (E-Mail Removed)
says...
> Well if I don't know how to properly format a <A> by now I'm in trouble.


No offense was meant. When answering questions, I can't really assume
too much about the posters knowledge in *all* fields.

Did you see my other reply that the parameters of the HREF were not
properly HTML encoded?

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele
 
Reply With Quote
 
 
 
Reply

Thread Tools

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
IE6 doesnt render the page properly whereas IE7 does =?Utf-8?B?QWxleCBGaW1pbmU=?= ASP .Net 2 08-31-2007 02:15 PM
Accessing rails render method outside of view / Decorating render Glenn Gillen Ruby 0 11-17-2006 02:30 PM
Style dont render correctly in Safari effendi@epitome.com.sg HTML 2 10-09-2006 12:34 PM
Page.Render do not render complete page Lau Lei Cheong ASP .Net 1 05-15-2004 04:10 AM
Using Table control in a custom composite control. Control does not render properly in design time. jb_in_marietta@yahoo.com ASP .Net 0 07-01-2003 09:26 PM



Advertisments