473,387 Members | 1,374 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to use showModalDialog in asp.net?

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
3 9881
"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
* "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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Simon Storr | last post by:
Is it possible to make the parent window refresh when a modal dialog is closed? I know I can use window.opener.location.reload(true); for a 'normal' window, but this doesn't work for...
6
by: Scott Lee | last post by:
I am displaying an ASP.Net generated form in a popup opened with window.showModalDialog. The form contains DropDownList controls. The first ddl is populated via databinding to a datatable, has...
4
by: MW de Jager | last post by:
I want to call ShowModalDialog(...) from my C# code in the code behind page of my aspx page. I do not want to link this to a button, since I want to first do some checking myself before I call the...
3
by: needin4mation | last post by:
Hi, I have an asp:button that has a ShowModalDialog script attribute added to it. When the ShowModalDialog opens the user is supposed to select some data which is then sent back to the calling...
2
by: Sarah | last post by:
I am using the javascript showModalDialog function to open a file upload window. The function opens a page which contains a usercontrol housing the file upload stuff. The control works fine when...
3
by: johkar | last post by:
Just want a verification of logic. This seems to work for IE and Firefox, but I wonder if it would be a problematic test in any of the other latest browsers? Is the use of the "window" object...
1
by: John | last post by:
Hi, I'm having a problem opening / downloading csv files when called from a page opened with window.showModalDialog( ). To isolate this problem, I've written 3 files (see below). 1. main.htm...
6
by: David | last post by:
Hi all, I am opening a webform with showModalDialog. This appears to pop-up fine, though I have a problem... Inside the webform is a treeview control. When the treeview is populated, I am...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.