W
Willem
This is making me mental: For some reason I can't get the virtual
application root directly in a control.
This doesn't work:
<asp:HyperLink ID="HyperLink1" Target="_parent" NavigateUrl="~/
page.aspx" runat="server">click here</asp:HyperLink>
it gives http://www.contoso.com/page.aspx
While it should give http://www.contoso.com/MyApplication/page.aspx
Now when I set the navigateURL in de Page_Load of the control, like
below, it does work:
HyperLink1.NavigateUrl = ResolveUrl("~/page.aspx");
gives: http://www.contoso.com/MyApplication/page.aspx
Now, I have about 30 controls with countless images. Is there an
easier way to get the virtual application root, then setting it all
individually in the Page_Load Event?
thanks in advance,
Willem
application root directly in a control.
This doesn't work:
<asp:HyperLink ID="HyperLink1" Target="_parent" NavigateUrl="~/
page.aspx" runat="server">click here</asp:HyperLink>
it gives http://www.contoso.com/page.aspx
While it should give http://www.contoso.com/MyApplication/page.aspx
Now when I set the navigateURL in de Page_Load of the control, like
below, it does work:
HyperLink1.NavigateUrl = ResolveUrl("~/page.aspx");
gives: http://www.contoso.com/MyApplication/page.aspx
Now, I have about 30 controls with countless images. Is there an
easier way to get the virtual application root, then setting it all
individually in the Page_Load Event?
thanks in advance,
Willem