Hyperlink not a link!?

S

Simon Harris

Hi,

I have this code in an ASPX file:

<table width="100%>
<tr>
<td><asp:hyperlink text="Home" cssclass=navLink tooltip="Home Page"
navigateurl="/index.aspx" runat=Server/></td>
<td><asp:hyperlink text="Browse Countries and Resorts" cssclass=navLink
tooltip="Browse Countries and Resorts" navigateurl="/browse.aspx"
runat=Server/></td>
<td><asp:hyperlink text="Contact Us" cssclass=navLink tooltip="Contact Us"
navigateurl="/contact_us.aspx" runat=Server/></td>
<td><asp:hyperlink text="Currency Converter" cssclass=navLink
tooltip="Currency Converter" navigateurl="/currency_converter.aspx"
runat=Server/></td>
<td><asp:hyperlink text="Customer Login" cssclass=navLink
tooltip="Customer Login" navigateurl="/customer_login.aspx"
runat=Server/></td>
</tr>
</table>

I am calling the control like this:

<%@ Register TagPrefix="SPD" TagName="TopNavBar"
src="/assets/ascx/top_navigation_bar.ascx"%>
<SPD:TopNavBar runat=server ID=TopNavBar/>

All seems to work fine, apart from the first link (home) which is not a
link. Whats really foxing me is that the resultant HTML code is:

<table width="100%>
<tr>
<td><a title="Home Page" class="navLink" href="/index.aspx">Home</a></td>
<td><a title="Browse Countries and Resorts" class="navLink"
href="/browse.aspx">Browse Countries and Resorts</a></td>
<td><a title="Contact Us" class="navLink" href="/contact_us.aspx">Contact
Us</a></td>
<td><a title="Currency Converter" class="navLink"
href="/currency_converter.aspx">Currency Converter</a></td>
<td><a title="Customer Login" class="navLink"
href="/customer_login.aspx">Customer Login</a></td>
</tr>
</table>


Looks fine to me!?

Simon.

--
-
* Please reply to group for the benefit of all
* Found the answer to your own question? Post it!
* Get a useful reply to one of your posts?...post an answer to another one
* Search first, post later : http://www.google.co.uk/groups
* Want my email address? Ask me in a post...Cos2MuchSpamMakesUFat!
 
S

Scott Mitchell [MVP]

Simon said:
All seems to work fine, apart from the first link (home) which is not a
link. Whats really foxing me is that the resultant HTML code is:

What do you mean by its "not a link"? It shows in the browser as
regular text? It's unclickable? What if you right-click on the link,
what do you see? Can you right-click on it? What browser are you using.

The HTML you got looks fine to me, too. Sounds like a browser issue...
does your CSS class have the navLink class make the hyperlinks look
weird? Regardless, you should still be able to visit the link by
clicking it...

--

Scott Mitchell
(e-mail address removed)
http://www.4GuysFromRolla.com
http://www.ASPFAQs.com
http://www.ASPMessageboard.com

* When you think ASP, think 4GuysFromRolla.com!
 
S

Simon Harris

Scott Mitchell said:
What do you mean by its "not a link"? It shows in the browser as
regular text? It's unclickable? What if you right-click on the link,
what do you see? Can you right-click on it? What browser are you using.

The HTML you got looks fine to me, too. Sounds like a browser issue...
does your CSS class have the navLink class make the hyperlinks look
weird? Regardless, you should still be able to visit the link by
clicking it...

--

Scott Mitchell
(e-mail address removed)
http://www.4GuysFromRolla.com
http://www.ASPFAQs.com
http://www.ASPMessageboard.com

* When you think ASP, think 4GuysFromRolla.com!

Ignore me, I missed out a closing quote on the width attribute of the table
tag...

<table width="100%> <<<<< Correcting this fixed the problem
<tr>
<td><a title="Home Page" class="navLink" href="/index.aspx">Home</a></td>
<td><a title="Browse Countries and Resorts" class="navLink"
href="/browse.aspx">Browse Countries and Resorts</a></td>
<td><a title="Contact Us" class="navLink" href="/contact_us.aspx">Contact
Us</a></td>
<td><a title="Currency Converter" class="navLink"
href="/currency_converter.aspx">Currency Converter</a></td>
<td><a title="Customer Login" class="navLink"
href="/customer_login.aspx">Customer Login</a></td>
</tr>
</table>

Scott - Thanks for your suggestions! :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top