"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Webform1.aspx is your parent page so the code I posted between the <body> tags (not including the body tags) for the parent page would go in the MainContent placeholder. The css including the <style> tags COULD go in the HeadContent placeholder OR it could go on a stylesheet with a <link> to the stylesheet in the HeadContent.

For the child page, create a new web form, Webform2.aspx, NOT a content form, and place everything I posted for the child form on that. This form will not be part of the MasterPage set. Place the code behind for the child page in WebForm2.aspx.vb. I have it written in C# so it needs to be converted to vb. You can use converter.telerik.com for that.

You will have to adjust some references to forms in the scripts so they match the names of your forms.

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

From the looks of the image, you appear to have that code on an aspx page. I see a closing </div> and a </script> tag. It should go in the Webform2.aspx.vb code behind AFTER the code is converted to vb.

Hi. Sorry but I am not getting this right. The code behind WebForm2 looks as follows
When I double click the button to insert the code I converted it simply highlights the line
<asp:Button ID="submitBut" runat="server" Text="Submit" OnClick="submitBut_Click" />
Also shouldn't there be code behind the button click on the first form to bring up the second

<!-- THIS IS THE CONTENT FOR YOUR CHILD PAGE THAT WILL LOAD INTO THE MODAL POPUP -->

When you create a web form or content form in Visual Studio, three files are created: WebForm2.aspx, WebForm2.aspx.vb, and WebForm2.aspx.designer.vb. Check your Solution Explorer to confirm this.

When you create a web form in VS there is a <%@ Page ... directive added to the top of the aspx file. Do not paste over this directive. Paste what I have provided below that directive.

The markup you posted above goes on WebForm2.aspx page below the Page directive.

The VB code you translated goes in the WebForm2.aspx.vb file under the Page_Load block.

The button that launches the child form is not an asp:Button, it's a standard html input, so it does not require any code behind in the WebForm1.aspx.vb file. The click event is handled by the javascript on the aspx page.