<asp:HyperLink ID="Link1" runat="server" Text="Record an activity" NavigateUrl="~/ActivityRecord.aspx">
            </asp:HyperLink>
            </div>
            <div>
            <asp:HyperLink ID="Link2" runat="server" Text="Add information" NavigateUrl="~/Information.aspx">
            </asp:HyperLink>

This is the code I have and I have the pages ActivityRecord and Information but it's not working. When I click either of the links it just reloads the home page I am already on.

Any suggestions

If the target links are in the same directory, try removing the ~/.

Yea tried that and it's still not working,

I just copied and pasted your clip and had no problem with a link pointing to a file in the same directory.

What error message do you see on the screen when you try to run this page? Or is this clip from your masterpage file?

It just reloads the page I'm already on. The way the page works is there is the user enters a number to search, this then brings a gridview back (which is in its own panel) with the results. When the user selects the result this panel disappears and the one that the two links are in appears. That all works fine, it's just the two links aren't working on my end.

Sounds like a postback is occurring. When you run this in a browser, have you taken a look at the HTML source? Anything thing extra going on, JavaScript?

Can you post the rendered HTML for those links? It sounds like either you are overriding the click with javascript, or you are changing the NavigateUrl values from the code behind.

I got it, there was a session variable that wasn't set so it was throwing the whole thing off. Thanks for the help

Good to hear you resolved the problem.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.