In page One.aspx I have
Code:
. . .
Server.Transfer("Two.aspx", True)
. . .
In web form Twoâs page load I call a user-defined function (MakeLinks()) to generate a dynamically-sized set of links to put across the top of the page for Two.aspx. (There might be 3 links, there might be 15:
Go To Page: [u]01</u> [u]02</u>
03 [u]04</u> [u]05</u> The current page [03 in this case] is represented, but is not a link.)
I use some data from Session, and some from the Request to create these links. I need these links to have Two.aspx as the target of the href.
Code:
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs _
) Handles MyBase.Load
LinksDiv.InnerHtml = MakeLinks(Session, Request)
End Sub
In VB6 I would have used URLFor(Two) to obtain the reference to Two.aspx.
In .NET I have not been able to find any way to accomplish this.
The .URL property of the Request is One.aspx, since that is who received the actual request...
I donât want to hard-code it, because I want the app to be capable of being moved without it becoming broken...
How can this be done?