Solved

Simple Hyperlink not working

Posted on 2013-01-08
11
201 Views
Last Modified: 2013-02-04
I have a simple horizontal navigator that contains 6 links.  In my local environment I'm able to redirect from page to page.  On host server nothing happens. this code resides in my masterpage calling files that exist on the root directory. Please see code below.  Any suggestions is appreciated.

                <!--Begin Navigator Bar -->
                <!--This section contains the Website Navigator -->
                <div id="navbar">
                    <ul id="topnav">
                        <li><asp:HyperLink ID="DefaultHome" runat="server" NavigateUrl="../Default.aspx" ToolTip="HOME" Text="HOME" /></li>
                        <li><asp:HyperLink ID="DefaultBio" runat="server" NavigateUrl="../Bio.aspx" ToolTip="About Robert Debonairé" Text="About Robert Debonairé" /></li>
                        <li><asp:HyperLink ID="DefaultMusic" runat="server" NavigateUrl="../Music.aspx" ToolTip="About The Music" Text="About The Music" /></li>
                        <li><asp:HyperLink ID="DefaultMedia" runat="server" NavigateUrl="../Pictures.aspx" ToolTip="PICTURES" Text="Pictures" /></li>
                        <li><asp:HyperLink ID="DefaultBlog" runat="server" NavigateUrl="" ToolTip="BLOG" Text="Robert's BLOG" /></li>
                        <li><asp:HyperLink ID="DefaultShow" runat="server" NavigateUrl="../Show.aspx" ToolTip="SHOWS" Text="SHOWS" /></li>
                        <li><asp:HyperLink ID="DefaultContact" runat="server" NavigateUrl="" ToolTip="CONTACT US" Text="CONTACT" Visible="false" /></li>
                    </ul>
                </div><!--End Navigator Bar-->
0
Comment
Question by:Robert Treadwell
  • 6
  • 4
11 Comments
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 38755889
Only one of your ASP:Hyperlinks actually contains a path to a file.  That said try...
     NavigateUrl="/Bio.aspx"
...or...
     NavigateUrl="~/Bio.aspx"
...and see if that solves your problem
0
 

Author Comment

by:Robert Treadwell
ID: 38756131
Thank you for your reply.  I had tried both of those previously and again after your post.  On the host server links still aren't working.  Unsure why?  I would hate to have to use linkbuttons because that will make a call to backend code but I know that works.
0
 

Author Comment

by:Robert Treadwell
ID: 38756266
Update, tried using linkbutton and it didn't work either. Has to be something on host server.
0
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 38756385
It's almost certainly a pathing issue.  When deployed on the server, what path does the hyperlink show when you hover over it?  Alternately, you can right-click and "view source."

In Visual Studio, do you have the "Virtual path" set to "/" (root)?
0
 

Author Comment

by:Robert Treadwell
ID: 38756718
I believe your correct.  I change the code to know call backend script to redirect, which doesn't work so the code now looks like this;  before then the href="Bio.aspx" for example.


                <!--This section contains the Website Navigator -->
                <div id="navbar">
                    <ul id="topnav">
                        <li><a id="ctl00_DefaultHome" title="HOME" href="javascript:__doPostBack('ctl00$DefaultHome','')" style="text-decoration:none;">HOME</a></li>
                        <li><a id="ctl00_DefaultBio" title="About Robert Debonairé" href="javascript:__doPostBack('ctl00$DefaultBio','')" style="text-decoration:none;">About Robert Debonairé</a></li>
                        <li><a id="ctl00_DefaultMusic" title="About The Music" href="javascript:__doPostBack('ctl00$DefaultMusic','')" style="text-decoration:none;">About The Music</a></li>
                        <li><a id="ctl00_DefaultMedia" title="PICTURES" href="javascript:__doPostBack('ctl00$DefaultMedia','')" style="text-decoration:none;">Pictures</a></li>
                        <li><a id="ctl00_DefaultBlog" title="BLOG" href="javascript:__doPostBack('ctl00$DefaultBlog','')" style="text-decoration:none;">Robert's BLOG</a></li>
                        <li><a id="ctl00_DefaultShow" title="SHOWS" href="javascript:__doPostBack('ctl00$DefaultShow','')" style="text-decoration:none;">SHOWS</a></li>
                        <li></li>
                    </ul>
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 38756838
So all these files sit in the root of the site?  Even the master page?  

How about...
     NavigateUrl="Bio.aspx"
...or...
     NavigateUrl="./Bio.aspx"
0
 

Author Comment

by:Robert Treadwell
ID: 38757615
No the master resides in a folder: /MasterPages/RDMaster.master
0
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 38757706
Try the changed NavigateURLs, then try putting the master page in the root of the web site.
0
 
LVL 1

Expert Comment

by:jinsonaf
ID: 38758385
Is your *.aspx handiler enabled in the iis of server? That too may be an issue.
0
 

Accepted Solution

by:
Robert Treadwell earned 0 total points
ID: 38837778
The issue was resolved by changing security parameters on the folders where aspx pages reside.
0
 

Author Closing Comment

by:Robert Treadwell
ID: 38850500
This resolution solved my problem
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now