Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Making a modal dialog w/an ASPX page?

0 views
Skip to first unread message

A Traveler

unread,
Sep 1, 2004, 9:15:56 AM9/1/04
to
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.


Eliyahu Goldin

unread,
Sep 1, 2004, 11:19:35 AM9/1/04
to
Open newCompanyDialog.aspx in HTML view and add a line <base target=_self>
in the head section.

Eliyahu

"A Traveler" <hitchhikers...@yahoo.com> wrote in message
news:%23bTHgXC...@TK2MSFTNGP10.phx.gbl...

A Traveler

unread,
Sep 1, 2004, 11:01:31 AM9/1/04
to
That worked absolutely perfectly!

Thank you very much, something so simple.
CheerZ!


"Eliyahu Goldin" <removem...@monarchmed.com> wrote in message
news:%23MqOl7C...@TK2MSFTNGP10.phx.gbl...

0 new messages