开发者

MasterPage.Master > Which page will be next loaded as a child?

I would like to know, in the Page Load event of my MasterPage.Master which page sent the request. will be loaded as child in the content.

Supposing, the user 开发者_运维问答clicks in my webpage <a href="Login.aspx">Login</a> can i get that value from the Page Load event of my MasterPage.Master for later processing?

Dim ThePageThatWillLoadAsChildIs as string =

You see i would like to use that, so when the request page is e.x. Login.aspx, inject in the form element of my webpage some attributes.


Have a look at Request.Url Property and get the necessary information there


I think what you are looking for is Request.UrlReferrer


Well this one does the trick (On the master page load)

Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
   Dim TheNextPageThatWillLoad As String = DirectCast(sender, MasterPage).Request.RawUrl
End Sub
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜