ASP.Net 2.0 Modal window - Master/Child page
-
Hello!! I am going nuts over this silly problem... has anyone come up with a solution? Maybe? :confused: I got a master page, and a child page. The child page is accessed from the master page via a linkButton, and is set to be a modal window (so it pops up). Now, I know from the asp.net 1.1 days that I am supposed to put between the and tags in the modal page so that it won't open another page after it posts... My problem is, the modal window is a 'chil' page to my master, and there are no and tags. Where should I stick in the tag????? Thank you guys :) -Nila
-
Hello!! I am going nuts over this silly problem... has anyone come up with a solution? Maybe? :confused: I got a master page, and a child page. The child page is accessed from the master page via a linkButton, and is set to be a modal window (so it pops up). Now, I know from the asp.net 1.1 days that I am supposed to put between the and tags in the modal page so that it won't open another page after it posts... My problem is, the modal window is a 'chil' page to my master, and there are no and tags. Where should I stick in the tag????? Thank you guys :) -Nila
You can place a contentplaceholder in the master page between the end head tag and the open body tag. In the content page, you can fill the base tag in a content control which associates with this contentplaceholder in the master page.
.......
</head>
<asp:contentplaceholder id="baseTagContent" runat="server">
</asp:contentplaceholder>
<body>
...... -
You can place a contentplaceholder in the master page between the end head tag and the open body tag. In the content page, you can fill the base tag in a content control which associates with this contentplaceholder in the master page.
.......
</head>
<asp:contentplaceholder id="baseTagContent" runat="server">
</asp:contentplaceholder>
<body>
......Thank you so much for helping me out... I am still having problems though :( Now the XHTML 1.0 Transitional validation fails telling me that the needs to be nested inside tag, and when I do place it within the asp:Content tag, it gives me an error saying that the tag cannot be nested within . This makes no sense, I don't even have a table structure!! Can you/anyone help me shed some light on this issue?? Thanks!
-
Thank you so much for helping me out... I am still having problems though :( Now the XHTML 1.0 Transitional validation fails telling me that the needs to be nested inside tag, and when I do place it within the asp:Content tag, it gives me an error saying that the tag cannot be nested within . This makes no sense, I don't even have a table structure!! Can you/anyone help me shed some light on this issue?? Thanks!
Placing the html tag in the Content control does not make sense to me. Here are a couple of options: + Just ignore the error if it's working. + Turn off the validation in the VS options settings (Tools|Options|Text Editor|Html|Validation|Show Errors). + Instead of placing the base tag in the content control, you can put the Literal control in there, and assign the base tag via the Text property of the Literal control in code.