How to use showModalDialog in asp.net?

  • Thread starter Thread starter Bruce
  • Start date Start date
B

Bruce

On WebForm1.aspx, I have a linkbutton to call a JavaScript
function to show a modal web page, WebForm2.aspx. Like
this:

function ShowNewPage()
{
window.showModalDialog("WebForm2.aspx","","width=400;
height=200; resizable=yes; scrollbars=yes; top=300;
left=300");
}

On WebForm2.aspx, I have a web control button. If I click
on it, something weird happened. Instead of post back to
the same page (WebForm2.aspx), it opens another web page,
which is unexpected behavior.

Does anybody know how to fix this problem and let modal
web page post back to itself?

Thanks a lot.
 
Bruce said:
On WebForm1.aspx, I have a linkbutton to call a JavaScript
function to show a modal web page, WebForm2.aspx. Like
this:

function ShowNewPage()
{
window.showModalDialog("WebForm2.aspx","","width=400;
height=200; resizable=yes; scrollbars=yes; top=300;
left=300");
}

This doesn't look like VB.NET code. Please turn to
microsoft.public.dotnet.framework.aspnet or a group dealing with this kind
of questions.
 
* "Bruce said:
On WebForm1.aspx, I have a linkbutton to call a JavaScript
function to show a modal web page, WebForm2.aspx. Like
this:

function ShowNewPage()
{
window.showModalDialog("WebForm2.aspx","","width=400;
height=200; resizable=yes; scrollbars=yes; top=300;
left=300");
}

On WebForm2.aspx, I have a web control button. If I click
on it, something weird happened. Instead of post back to
the same page (WebForm2.aspx), it opens another web page,
which is unexpected behavior.

The question is not related to VB.NET. You may want to ask questions
like this in the ASP.NET group:

<
Web interface:

<http://msdn.microsoft.com/newsgroup...roup=microsoft.public.dotnet.framework.aspnet>

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Improve your quoting style:
<http://learn.to/quote>
<http://www.plig.net/nnq/nquote.html>
 
Bruce
You show us the code from page 1 and tells that there is an error when you
push on the button from page 2.

You just start a new aspx page called WebForm2.aspx.

That one is totaly new for your asp.net server.

So to help you we need to know more of that page an if posible the
vb.language code that you using with it?

Maybe we can help you then.

Cor
 
Back
Top