开发者

When a ASPX page is opened using window.showModalDialog, Then that page showing Page.Header object as nothing

I have ErrorMsg.aspx page which pops up using window.showModalDialog(..) I want to add javascript and CSS in the header of this page using code behind. For adding javascript and CSS in header I need Header object of ErrorMsg.开发者_C百科aspx page. But when I am checking PAGE object of this page the Header object is showing me NOTHING. I am able to get Header object for other pages.

Is it a problem with window.showModalDialog(...)?


No, the page doesn't work any different on the server when it's opened using showModalDialog. The server isn't even aware that the page will end up there.

You need the runat="server" attribute in the head tag to be able to access it from server code:

<head runat="server">
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜