?
Solved

Simple Hyperlink not working

Posted on 2013-01-08
11
Medium Priority
?
207 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month7 days, 21 hours left to enroll

765 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