473,322 Members | 1,911 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,322 software developers and data experts.

Making a modal dialog w/an ASPX page?

Hello all,

Here is my situation... i have a page which has a dropdown of companies.
Next to it i have a "New" button for creating a new company. What i would
like to do is to show a modal dialog with the company entry screen, then
once it is dismissed, let the button continue with its postback and rebind
the companies dropdown to include the new company.

What i tried was to put in a javascript function in my html
function makeNewCompany(){
window.showModalDialog('/newCompanyDialog.aspx'); }
Then in my aspx.vb file, i put in btnNewCompany.Attributes.Add("onclick", "javascript:makeNewCompany();")


This all would be fine, and works fine... up till the point at which from
the dialog i click the "Save" button. Then the aspx file tries to do its
postback which apparently does not work in a dialog window. Instead it winds
up creating a brand new IE window to process the postback.

Is there ANY way i can perform this kind of functionality within the ASP.NET
model? Is there perhaps some way in which i can do a "window.open" and make
it so that the btnNewCompany's postback will hold pending the release of
that other window in a modal sort of way?

Thanks in advance,

- Hitchhiker.
Nov 18 '05 #1
2 2293
Open newCompanyDialog.aspx in HTML view and add a line <base target=_self>
in the head section.

Eliyahu

"A Traveler" <hi*********************@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hello all,

Here is my situation... i have a page which has a dropdown of companies.
Next to it i have a "New" button for creating a new company. What i would
like to do is to show a modal dialog with the company entry screen, then
once it is dismissed, let the button continue with its postback and rebind
the companies dropdown to include the new company.

What i tried was to put in a javascript function in my html
function makeNewCompany(){
window.showModalDialog('/newCompanyDialog.aspx'); }
Then in my aspx.vb file, i put in
btnNewCompany.Attributes.Add("onclick", "javascript:makeNewCompany();")


This all would be fine, and works fine... up till the point at which from
the dialog i click the "Save" button. Then the aspx file tries to do its
postback which apparently does not work in a dialog window. Instead it

winds up creating a brand new IE window to process the postback.

Is there ANY way i can perform this kind of functionality within the ASP.NET model? Is there perhaps some way in which i can do a "window.open" and make it so that the btnNewCompany's postback will hold pending the release of
that other window in a modal sort of way?

Thanks in advance,

- Hitchhiker.

Nov 18 '05 #2
That worked absolutely perfectly!

Thank you very much, something so simple.
CheerZ!
"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Open newCompanyDialog.aspx in HTML view and add a line <base target=_self>
in the head section.

Eliyahu

"A Traveler" <hi*********************@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hello all,

Here is my situation... i have a page which has a dropdown of companies.
Next to it i have a "New" button for creating a new company. What i would
like to do is to show a modal dialog with the company entry screen, then
once it is dismissed, let the button continue with its postback and
rebind
the companies dropdown to include the new company.

What i tried was to put in a javascript function in my html
> function makeNewCompany(){
> window.showModalDialog('/newCompanyDialog.aspx'); }


Then in my aspx.vb file, i put in
> btnNewCompany.Attributes.Add("onclick", "javascript:makeNewCompany();")


This all would be fine, and works fine... up till the point at which from
the dialog i click the "Save" button. Then the aspx file tries to do its
postback which apparently does not work in a dialog window. Instead it

winds
up creating a brand new IE window to process the postback.

Is there ANY way i can perform this kind of functionality within the

ASP.NET
model? Is there perhaps some way in which i can do a "window.open" and

make
it so that the btnNewCompany's postback will hold pending the release of
that other window in a modal sort of way?

Thanks in advance,

- Hitchhiker.


Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Earl Teigrob | last post by:
Can a Modal Dialog Box do forms ASP.NET forms validation from within the Modal Box? I want to pop up a dialog box to the user and have it do its own post backs with validation checking and then...
2
by: Guadala Harry | last post by:
I have a frameset aspx page that enables users to upload photos. One frame/page shows a thumbnail list of prevously-uploaded images, and the other frame/page includes the controls that enable...
10
by: Guadala Harry | last post by:
I have a modal dialog that currently does all of the following except item 4. 1. lets users select a graphic from a list of thumbnails (and when selected, displays the full-size image in a...
1
by: Ganesh Ramamurthy | last post by:
Hi Experts, I am having a serious problem now. I am using IE for developing my asp.net application. My application need not run in Netscape. I have a peculiar problem. I have an aspx page from...
2
by: Samy | last post by:
Hi There, I have a user control with buttons on it which I use on a aspx page (parent page). On a button click, a modal dialog(aspx page) opens up and the user enters some info in the modal dialog...
1
by: wendy | last post by:
I have got a problem while using the modal dialogs. In my code I need to open a modal dialog from the parent page and I need to enter some values in the dialog and save it. It takes the values...
2
by: sthrudel | last post by:
Hi! I'm working on a web application in Asp.net and what I would like to have is a cross borwser modal dialog which accepts user's input. I would like to catch what the user clicked on the...
1
by: mikeh3275 | last post by:
I'm new to developing in jQuery, so I'm probably doing this wrong. I'm loading a form into a modal dialog box and I'm trying to assign a click event to the button in the form, but I can't seem to...
3
by: Mike Hofer | last post by:
Okay, here's the situation: we want to be able to display ASPX pages in an UpdatePanel. The reasons for this are performance related. The site in development uses *lots* of modal popups from some...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.