Click here to Skip to main content
11,719,973 members (82,262 online)
Click here to Skip to main content

Modal popup dialog window with multiple parameters

, 13 Sep 2003 285.8K 70
Rate this:
Please Sign up or sign in to vote.
Modal popup dialog window which passes and returns multiple parameters

Introduction

This article shows a modal popup dialog window which passes and returns multiple parameters. This sample creates parent and child webforms. The child webform is called modally by the parent passing multiple values to the child form. The child form displays the passed values allowing them to be edited and then returns the altered values back to the parent when finished. The child form is modal to only the parent form. To make the child modal to the entire desktop, see the below final note.

Scope

ASP, ASP.NET, C#, VB.NET, Visual Basic, Java

Steps

  1. Open a New Web project in Visual Studio
  2. Create two New WebForm pages named ParentWebForm and ChildWebForm
  3. Open the HTML surface for the ParentWebForm
  4. Locate the yellow line
  5. Delete all code EXCEPT the yellow line
  6. Insert the following HTML below the existing yellow line
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
        <HEAD>
            <title>Parent Webform</title>
  7. In the above code, locate the line saying //ALTER BELOW LINE
  8. Supply the correct URL for your ChildWebform
  9. Open the HTML surface for the ChildWebForm
  10. Locate the yellow line
  11. Delete all code EXCEPT the yellow line
  12. Insert the following HTML below the existing yellow line
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
        <HEAD>
            <TITLE>Child Webform</TITLE>
  13. Set the project StartUp page to be the Parent Webform
  14. Run the project.

Final Note

To make the child modal to the entire desktop, you'll need add code to the child which uses <body onblur="this.focus">.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

FlashMerlot
Web Developer
United States United States
No Biography provided

You may also be interested in...

Comments and Discussions

 
QuestionThanks My Vote is 5 Pin
A. Najafzadeh18-Aug-14 20:01
memberA. Najafzadeh18-Aug-14 20:01 
QuestionModal popup dialog window with multiple parameters Pin
raja.mstech20-Nov-13 4:22
memberraja.mstech20-Nov-13 4:22 
GeneralVery useful! Pin
Gabriel F Gomes12-Aug-13 8:32
memberGabriel F Gomes12-Aug-13 8:32 
GeneralBrowser dependent Pin
Sorin Serban18-Mar-08 22:39
memberSorin Serban18-Mar-08 22:39 
QuestionHow can i open the popup in Firefox ? Pin
HiRoNvp20-Sep-07 0:31
memberHiRoNvp20-Sep-07 0:31 
Generalhi, can i know what u meant by yellow line Pin
rama charan16-Jul-07 4:49
memberrama charan16-Jul-07 4:49 
GeneralLightweight version inchl framework available for download (free) Pin
inchl12-Jun-07 5:02
memberinchl12-Jun-07 5:02 
GeneralDialogs in ASP.NET using server-side-blocked-calls Pin
inchl27-Sep-06 11:27
memberinchl27-Sep-06 11:27 
GeneralRe: Dialogs in ASP.NET using server-side-blocked-calls Pin
naga_01_raj29-Nov-06 0:31
membernaga_01_raj29-Nov-06 0:31 
NewsRe: Dialogs in ASP.NET using server-side-blocked-calls Pin
inchl12-Jun-07 5:02
memberinchl12-Jun-07 5:02 
QuestionHow do i get another form with postback in popup window Pin
Mahesh Perumal30-Jun-06 8:56
memberMahesh Perumal30-Jun-06 8:56 
GeneralUnicode support Pin
Nexum Bogazici22-Jan-06 20:13
memberNexum Bogazici22-Jan-06 20:13 
GeneralPopup dialog on FireFox & Safari Pin
Tham Nguyen5-Jun-05 21:41
memberTham Nguyen5-Jun-05 21:41 
GeneralRe: Popup dialog on FireFox &amp; Safari Pin
mishraz16-Dec-05 19:14
membermishraz16-Dec-05 19:14 
AnswerRe: Popup dialog on FireFox & Safari Pin
B4rT4518-Aug-06 2:23
memberB4rT4518-Aug-06 2:23 
GeneralOverhere Pin
skjagini11-Feb-05 8:51
memberskjagini11-Feb-05 8:51 
Questionwho copies whom? Pin
Anonymous15-Jul-04 15:21
sussAnonymous15-Jul-04 15:21 
AnswerRe: who copies whom? Pin
David M. Kean15-Jul-04 18:03
memberDavid M. Kean15-Jul-04 18:03 
Questionwho sopies whom? Pin
Anonymous15-Jul-04 15:20
sussAnonymous15-Jul-04 15:20 
GeneralOther types of arguments Pin
Ruuca26-Mar-04 1:33
memberRuuca26-Mar-04 1:33 
QuestionScope? Pin
kgrubbs17-Sep-03 11:24
memberkgrubbs17-Sep-03 11:24 
AnswerRe: Scope? Pin
FlashMerlot18-Sep-03 4:29
memberFlashMerlot18-Sep-03 4:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150901.1 | Last Updated 14 Sep 2003
Article Copyright 2003 by FlashMerlot
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid