.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Trying to understand the logic of modalPopup Extender

Posted By:      Posted Date: October 21, 2010    Points: 0   Category :ASP.Net


I've read about the Modal Popup in AJAX toolkit and watched the video but still have some questions. In order to learn how it works, I wanted to do a simple example where I have a label control and a modal pop up within an UpdatePanel. The idea is to let the user click a LinkButton to call the modal pop up so that he/she can enter some text into a TextBox. I then take what the user entered and stuff it into my Label control. Simple enough! The part that I'm not clear about is the purpose of JavaScript placed on the ASP.NET pages i.e. all the examples I looked at had some type of JavaScript code on the ASP.NET page. In my example I don't have this JavaScript code which may be the reason why my code is not working.  I'd appreciate it if someone could tell me how things are supposed to work in order to get this code to work properly.

The part that I'm not getting is that the LinkButton invokes the modal popup because we tell it to in the Modal Popup Extender. From there, the code behind should work and because everything is happening in an UpdatePanel, my label control should get updated without a page refresh. What am I missing here? 

Here's my code:

Here's the ASP.NET page code:


<head runat= 

View Complete Post

More Related Resource Links

how to get value from griview to modalpopup extender


i have a grid view and on clik of link byutton i open moral extender...now how can i pass the value from grid to moral extender.

i have checked few links here but that dint give me much idea...please suggest me on some code..thanks

 <asp:GridView ID="Gridgpapp"  runat="server" DataSourceID="ApprovalGp" AutoGenerateColumns="False" 
            AllowPaging="True" AllowSorting="True" BorderColor="#3366CC" BackColor="White" BorderStyle="None" 
            BorderWidth="2px" CellPadding="4" ShowFooter="True" EmptyDataText = "No Gatepass waiting for Approvals">
              <RowStyle BackColor="White" ForeColor="#003399" />
                   <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
                   <PagerStyle BackColor="#99CCCC"  HorizontalAlign="Left" />
                   <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
                   <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
                  <asp:BoundField DataField="passno&q

show modalpopup extender in radio button click.



I have a radio button list and it is populating data from database.

I want to show a modal popup extender when someone clicks a specific value in the radio button list.

For example:

display the modal popup when radiobuttonlist.value=="13".

is this possible??

Cascading DropDown List & RadioButton in ModalPopup Extender


I need help to integrate all of those control in asp.net page. I am using the newest AJAX control toolkit. What I want to accomplish is I have a modal popup panel with cascading dropdown list and radio button inside. The issue is the postback. RadioButton and Cascading dropdown have postback so that will cause the modal panel disappear after the postback. I just want the panel disappear after I click the ok button on the panel and send the data into a field in a page. What I did was I placed the update panel inside the popup panel. If I did that, I would see the dropdown lists automatically refresh every time by accessing the webservice. If I placed the update panel outside, the dropdown would not be triggered. Even I set the trigger for the Update Panel, it will not see that way.

using ValidatorCalloutExtender in modalpopUp extender


Hello, I am trying to use ValidatorCalloutExtender in ModalpopUp but i am unable to show it on panel its shows behind my  panel ..

Is there any solution for this thing..??

I am able to validate the textbox but want to show the message in ValidatorCalloutExtender

How do i pop up datas to ajax modalpopup extender just by clicking on the row in gridview?


How do i pop up datas to ajax modalpopup extender just by clicking on the row in gridview?

i have to get only the selected row to the pop up window, the row selection should be made only by clicking on the row.....am trying to do it using the ajax modal popup control extender, i just sould't figure out a solution....

please help me, thank you in advance

Logic behind N -Tier Application Development

In the arena of application development, developers all over the world use various programming languages, technical processes, and technical tools. While using number of technical & non technical elements the processes or methods become complex, for simplification of the application development process, developers use various techniques such as dividing the application architecture into layers or parts. In the professional & technical language this separation or division process is called N-Tier Application Development process, where "N" stands for number and "tire" stands for layers or parts.

no intellisense, smart tag, extender wizard etc


Development Environment:  VS 2008 Pro, IIS 6, asp.net 2.x, sql 2005 server

Installed the version of AJAX Toolkit and Library for the .net 2.0 compatibility (as IIS is still using 2.x)

The problem is as that within the vs 2008 pro, when I select for example a button control...there should be an additional pop-up intellisense indicating...add extender.

to compound this, within the extender control ... the TargetControlID -- should be a drop-down list, indicating which controls are compatible with the extender ... there is no drop-down list.

even if I manually type the control to associate the extender with, this has no effect on the control (such as textbox control) -- as there should be another option appear indicating the association has taken place).

 below is the steps to take (as written by MS) -- but this is what I am not getting:

"If the Button Tasks shortcut menu does not appear, right-click the Button control and then click Show Smart Tag."  -- the smart tag is not appearing

To add an AJAX extender control
Switch to Design view.

If the page does not already contain a ScriptManager control, from the AJAX Extensions tab of the Toolbox, drag one onto the page.

A ScriptManager c

how implement transformations in slideshow extender.



i am working on ajax slideshow extender.

can anybody help in coding for 

1) implement transformations between slide to slide.

2) and the direction means orientation in changing of slides.

I hope u got my querries.

please help in this regard.

thanks in advance.

calendar extender


i want to put date into 2 combo box

combo1 = date, and combo2= month

can you help me?

Open ModalPopup dialog on page load


Is there a way to make a modal popup panel active on page load so that the user can't do anything until they deal with the popup dialog?

Animation Extender ( LinkButton Disbale )


My flyout animation starts on a click of linkbutton, everything works fine on IE, as I click the linkbutton flyout animation is triggered and linkbutton gets disbaled during the animation. But on Firefox and Chorme linkbutton doesn't get disbaled , due which if I again and again click on the linkbutton the flyout animation keeps moving towards left side on every click.

In firefox and chorme linkbutton always remains enabled.

 <cc1:AnimationExtender ID="AnimationExtender1" TargetControlID="lnkBtnAbt" runat="server">
                        <EnableAction Enabled="false" />
                        <StyleAction AnimationTarget="moveMe" Attribute="display" Value="block"/>
                        <Parallel AnimationTarget="moveMe" Duration=".5" Fps="30">
                            <Move Horizontal="-350" Vertical="50"></Move>
                            <FadeIn Duration=".5"/>
                        <Parallel AnimationTarget="moveMe" Duration=".5">

Pattern for huge logic



I am looking for a pattern/way to code for implement Huge logical hierarchy, Basically this is to verify person details like qualification, experience, expertised-in and global region.... and issue certain access for a perion of time.

The verification process has huge number of conditions it took around 1 year to document. And now we have to develop C# to implement it, can any one help me...? a sample code will be appreciated.

Thank you


Logic to calculate business hours


Hi All,

I have tried searching all over the web for this logic. Got many but half of them did not match what i was looking for and half were malfunctioning.

I want to calculate business working hours between 2 datetime, where in I should be able to set the working hours as well as weekends and holidays should not be calculated.


Please help me guys... It will be a great help... 

Memory Models: Understand the Impact of Low-Lock Techniques in Multithreaded Apps


Because the use of low-lock techniques in your application significantly increases the likelihood of introducing hard-to-find bugs, it is best to use them only when absolutely necessary. Here Vance Morrison demonstrates the limitations and subtleties low-lock techniques so that if you are forced to use them you have a better chance of using them correctly.

Vance Morrison

MSDN Magazine October 2005

Virus Hunting: Understand Common Virus Attacks Before They Strike to Better Protect Your Apps


Developer's machines can often be more vulnerable to viruses than the average corporate user because of their more frequent access to remote machines and shares, and the differing administrative privileges they maintain across mutiple machines. Reliance on antivirus software is fine as a first line of defense, but you need a basic arsenal of skills for securing the executables on your system and coping with viruses on your own. This article reviews proactive methods you can use to defend yourself against malicious executable code in resources, component libraries, scripts and macros, as well as how to avoid a handful of other potential vulnerabilities.

Jason Fisher

MSDN Magazine May 2003

Open different page using Ajax Modal PopUp Extender Control

The article Open different page using Ajax Modal PopUp Extender Control was added by Chintan Dave on Thursday, July 15, 2010.

You May use Modal Popup Extender to open some part of the page as Popup. But there we don't have any property to open other html or aspx page in Popup window.We can do it using IFrame control. What we have to do, just add IFrame control in Panel that

ModalPopup/UpdatePanel from codebehind, inconsistent behavior onClick


First post bear with me please:

I have a simple form with a list of linkbuttons, each fires the same onclick event which sets an indicator image.  I have a dummy button with style="display:none" which I have set as the TargetControlID of the modal.

onClick event from the imagebutton, the modal is shown via modal.Show().  The cancel button inside the modalpopup fires an event which turns off the indicator image and hides the modal via modal.Hide(). 

The events fire perfectly, it's very simple!  Although after doing some testing I noticed the modalpopup is not presented after the 6-10th cycle of clicking the open event, then clicking cancel.  The grey background appears but it is behind the main panel and the modal is either presented behind this or is just simply not displaying. 

I spent hours researching various methods, implemented the CancelControlID to see if it was somehow tied to my call of modal.Hide() that fails.

This occurs with an updatepanel only.  The behaviour is much cleaner this way, so I would hope to be able to implement this.  I have basically eliminated everything but these two events!  Please help

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend