By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,747 Members | 1,683 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,747 IT Pros & Developers. It's quick & easy.

How to use showModalDialog in asp.net?

P: n/a
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=4 00;
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.

Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Bruce" <an*******@discussions.microsoft.com> schrieb
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=4 00;
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.
--
Armin

http://learn.to/quote
http://www.plig.net/nnq/nquote.html

Nov 20 '05 #2

P: n/a
* "Bruce" <an*******@discussions.microsoft.com> scripsit:
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=4 00;
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:

<news://msnews.microsoft.com/microsoft.public.dotnet.framework.aspnet>

Web interface:

<http://msdn.microsoft.com/newsgroups/default.asp?url=/newsgroups/loadframes.asp?icp=msdn&slcid=us&newsgroup=microso ft.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>
Nov 20 '05 #3

P: n/a
Cor
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

function ShowNewPage()
{
window.showModalDialog("WebForm2.aspx","","width=4 00;
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.

Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.