MasterPage.Master>接下来将作为子页面加载哪个页面?
我想知道,在我的 MasterPage.Master
的 Page Load
事件中,哪个页面发送了请求。 将作为子级加载到内容。
假设用户点击我的网页Login
我可以从Page Load
事件中获取该值我的 MasterPage.Master
供以后处理?
Dim ThePageThatWillLoadAsChildIs as string =
你看,我想使用它,所以当请求页面是 Login.aspx 时,在我的网页的表单元素中注入一些属性。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
查看 Request.Url 属性并在那里获取必要的信息
Have a look at Request.Url Property and get the necessary information there
我认为您正在寻找的是 Request.UrlReferrer
I think what you are looking for is Request.UrlReferrer
好吧,这个就可以了(在母版页加载上)
Well this one does the trick (On the master page load)