473,698 Members | 2,153 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.showModa lDialog('/newCompanyDialo g.aspx'); }
Then in my aspx.vb file, i put in btnNewCompany.A ttributes.Add(" onclick", "javascript:mak eNewCompany();" )


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.ope n" 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 2307
Open newCompanyDialo g.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******** ********@TK2MSF TNGP10.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.showModa lDialog('/newCompanyDialo g.aspx'); }
Then in my aspx.vb file, i put in
btnNewCompany.A ttributes.Add(" onclick", "javascript:mak eNewCompany();" )


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.ope n" 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.co m> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
Open newCompanyDialo g.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******** ********@TK2MSF TNGP10.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.showModa lDialog('/newCompanyDialo g.aspx'); }


Then in my aspx.vb file, i put in
> btnNewCompany.A ttributes.Add(" onclick", "javascript:mak eNewCompany();" )


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.ope n" 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
2878
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 save the data and close the dialog when the page is valid. I have read a little about using Iframes to post back to, but was wondering if this would work for what I am trying to do? Also, does anyone have a code sample of this (postback from modal...
2
2583
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 selecting and uploading additional photos. After uploading a file, the list of thumbnail images needs to get refreshed to show the newly uploaded picture. This is accomplished by using the following code: string scriptString = "<script...
10
2750
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 preview DIV) 2. when users close the dialog, the application receives the URL to the selected graphic. 3. the modal dialog lets the users upload a new graphic if the dialog does not present them with one they are already happy with. 4. upon uploading...
1
355
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 which when the user clicks on the save button, I am calling a javascript function which shows up a modal dialog box. I want the user to do certain varifications before the save. Inside the modal dialog, I have a datagrid which has a template...
2
3410
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 and clicks the save button on it. The info is saved to the DB and the parent page is refreshed. Everything works fine but for some reason the page load is called twice. I have set the AutoEventWireUp = false on every page. Also I have load event...
1
1390
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 properly and also does the validation of the values but it doesn't hit the event handler of the button where it is supposed to save those values and close the box. Any help is appreciated. Thanks
2
3683
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 dialog. To be more specific I want to have a confirmation dialog that is shown when a user clicks on a Delete button (which deletes some values from database). If Yes is pressed the delete action is processed otherwise modal dialog is closed.
1
49875
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 get anything to happen. Below is the code. Thanks in advance. jQuery: jQuery(document).ready(function() { jQuery("a").click(function() { jQuery("#dialog").dialog({ modal: true,
3
3870
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 pages, and we don't want to load all that content until it's requested. So, what we want to do is place an IFRAME inside an UpdatePanel and, in the onclick event for the linkbutton or button control, set the SRC so that the content is loaded on...
0
8672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8600
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9155
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8890
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8858
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7711
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5859
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3038
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
1997
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.