Hyperlink is going to wrong place

Discussion in 'ASP .Net' started by amchimam, Aug 1, 2006.

  1. amchimam

    amchimam Guest

    My asp.net code is:
    <asp:hyperlink id=hyperlink1 runat="server" NavigateUrl='<%# "../dafault.aspx?
    Dp=" & databinder.eval(container.dataitem, "dp")....................</asp:

    and I have 5 computers, three of them go to it suppose be
    www.mysite.com/host/default.aspx? Dp=...

    another to computers are go to www.mysite.com/host/host/default.aspx? Dp=...

    I don't know why, please help.
    amchimam, Aug 1, 2006
    1. Advertisements

  2. amchimam

    MatsL Guest

    When you specify the url to go to you can use ~ to get the application
    root. So you could use ~/host/default.aspx instead of ../default.aspx

    Hope I understood your problem correctly.

    MatsL, Aug 2, 2006
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.