[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 211
  • Last Modified:

Simple Hyperlink not working

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
Robert Treadwell
Asked:
Robert Treadwell
  • 6
  • 4
1 Solution
 
Paul MacDonaldDirector, Information SystemsCommented:
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
 
Robert TreadwellAuthor Commented:
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
 
Robert TreadwellAuthor Commented:
Update, tried using linkbutton and it didn't work either. Has to be something on host server.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Paul MacDonaldDirector, Information SystemsCommented:
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
 
Robert TreadwellAuthor Commented:
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
 
Paul MacDonaldDirector, Information SystemsCommented:
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
 
Robert TreadwellAuthor Commented:
No the master resides in a folder: /MasterPages/RDMaster.master
0
 
Paul MacDonaldDirector, Information SystemsCommented:
Try the changed NavigateURLs, then try putting the master page in the root of the web site.
0
 
jinsonafCommented:
Is your *.aspx handiler enabled in the iis of server? That too may be an issue.
0
 
Robert TreadwellAuthor Commented:
The issue was resolved by changing security parameters on the folders where aspx pages reside.
0
 
Robert TreadwellAuthor Commented:
This resolution solved my problem
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now