By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,225 Members | 2,172 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,225 IT Pros & Developers. It's quick & easy.

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

P: n/a
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!
Nov 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
In article <O8**************@TK2MSFTNGP09.phx.gbl>, ra********@aol.com
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
Nov 18 '05 #2

P: n/a
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.
Nov 18 '05 #3

P: n/a
In article <eh**************@TK2MSFTNGP09.phx.gbl>, ra********@aol.com
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
Nov 18 '05 #4

P: n/a
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.
Nov 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.