How Do I: Use the ASP.NET AJAX ModalPopup Extender Control?

Learn how to use the ASP.NET AJAX ModalPopup extender control that comes with the ASP.NET AJAX Control Toolkit. In this video the ModalPopup extender is used to pop open a standard ASP.NET Panel control as a modal dialog box.

Presented by Joe Stagner

Duration: 10 minutes, 29 seconds

Date: 26 January 2007

Watch the video   |   Download the video   |   Get VB code  or  C# code

Video downloads: WMV | Zune | iPod | PSP | MPEG-4 | 3GP

Audio downloads: AAC | WMA | MPEG-4 | MPEG-3 | MPEG-2

Comments : 20

Leave a Comment

mpdan : On March 07, 2008 4:26 PM said:

You guys make this too easy!

JoeStagner : On March 15, 2008 12:51 PM said:

:) Thanks !!!

guangzhou_2007 : On March 18, 2008 4:31 AM said:

These are good things for me!! Thank you

PsionSharp : On March 20, 2008 11:07 AM said:

That's what I'm talking about. Easy.  Thanks.  

I got one for you.

Adding context menu to a ListBox.

JoeStagner : On March 25, 2008 2:43 PM said:

mmmmm.. Can yo ugive me an example ?

Feel free to email me via my blog at www.joeon.net

fsilva : On March 26, 2008 10:38 PM said:

Joe:

In the past I used Telerik RAD controls which allowed ModalPopups to contain individual web pages from either the same project/solution or a different web site page altogether.  

I don't have use of that assembly anymore and was wondering if there's a way to accomplish the same thing using the AjaxControlToolkit ModalPopup?

All of my searches show that this AJAX control supports panels exclusively.  I actually placed an iFrame within a panel, within a ModalPopup but have a very buggy-javaScript parent page.

I am desperate... any ideas on how to do this?

Thanks in advance

darthocellaris : On March 28, 2008 11:53 AM said:

How would you set it up so that you can pass in a dynamic string to display in the ModalPopup? I'm trying to replace the javascript 'alert' function I use now for popup messages so I can use CSS to make my popups nicer.

I'm guessing DynamicServiceMethod has something to do with my question?

dtsob75 : On April 03, 2008 5:33 PM said:

Joe,

I have a need to use the modalpopup, but the code I need to use is all in a separate ASPX page.  I can change that to an ASCX user control. WOuld that work as the popup control?  How would I set the controlID (ok and cancel), since they would be controls in the ASCX?

Any help would be apprciated.

jonefer : On April 04, 2008 5:07 PM said:

I'd like to use the Modal Popup Extender triggered by a link button in a GridView Control... is this possible?

dtsob75 : On April 07, 2008 10:12 AM said:

I found several articles on using from within a gridview.  Here are a couple:

www.aspdotnetcodes.com/Ajax_ModalPopup_PostBack_GridView.aspx

aspalliance.com/1509_Working_with_ModalPopup_Ajax_Control.all

fluffy_vb : On April 07, 2008 4:37 PM said:

I just did a gridview on a modal pop today. It's AWSOME. I just used the regular basic panel popup scenario, placed a LINQ datasource on the page and wired it to a gridview on the panel to be popped up. Works great though I haven't figured out how to get the ModalPopupExtender OkControlID wired to the row select on the gridview. I'm on the trail of using a template field to select the row so I can have a named control......  If you figure that one out let me know.

realjuancho : On April 08, 2008 1:00 PM said:

i just did this example and run it on my 2 different browsers to find out that when following these exact steps Internet Explorer 7 does not show the modal pop up while Mozilla does. does anybody know why??

to Joe: thanks for this very useful videos

javed_alam786 : On April 14, 2008 11:46 AM said:

Hi Joe, i am trying to get the   Modal Popup Extender triggered when the user clicks  on a hyperlinked ProductID field in a gridview. How should i approach this.

JoeStagner : On April 14, 2008 8:31 PM said:

realjuancho - can you emal me a sample ?

javed - what do you want to happen when the user clicks? Feel free to email me via the COntact form on my blog at www.joeon.net

javed_alam786 : On April 15, 2008 4:12 AM said:

I just want a AJAX popup window with Close button. The popup will only display the product details.

masfenix : On April 16, 2008 11:40 PM said:

To javed:

Why dont you just put a small close button? or even take a small "x" image and use CSS to position it on top of the panel?

I suppose the cancelControlID captures the click event on any control to close. I could be terribly wrong though.

javed_alam786 : On April 17, 2008 5:15 AM said:

Masfenix:

What you are saying is correct but my intention is to display records in a GridView with ProductId as HyperLinked Field. When the user clciks on this hyperlink i want to pop an AJAX Modal PopUp to display Product detail and a Close Button only, i am having no problem on ButtonClick event but i just cant get this thing to work on hyperlink.

migs8teen : On May 09, 2008 1:20 AM said:

sir joe,

good day..

can you help me with my problem i find this tutorial so helpful..

but my problem is how can i associate this modal pop up extender in my grid view and having a database in ms access..

pls help me sir.. i wanted only my program that if i click on a current record in gridview it will pop out all the records of the name you click in details view nad there you can edit,cancel and update that record that i click..  pls help me sir..

thanks in advance sir..

migs

NEWBIE

migs8teen : On May 09, 2008 1:30 AM said:

sir joe,

good day..

can you help me with my problem i find this tutorial so helpful..

but my problem is how can i associate this modal pop up extender in my grid view and having a database in ms access..

pls help me sir.. i wanted only my program that if i click on a current record in gridview it will pop out all the records of the name you click in details view nad there you can edit,cancel and update that record that i click..  pls help me sir..

thanks in advance sir..

migs

NEWBIE

ajay333 : On May 14, 2008 11:45 AM said:

migs8teen, this is what you might be looking for:

www.aspdotnetcodes.com/Ajax_ModalPopup_PostBack_GridView_Sample.aspx

Leave a Comment

You must be logged in to leave a comment. Click here to log in.