Solved

Popup Control Extender

Posted on 2011-02-14
4
256 Views
Last Modified: 2014-06-01
Having some issues with a popup control extender, can't get the button to fire to close window

<asp:updatepanel id="UpdatePanel1" runat="server">
   <ContentTemplate>
      <asp:TextBox runat="server" ID="tbSupportStaff"></asp:TextBox>
     
      <cc1:PopupControlExtender runat="server" ID="popSupportStaff"
        TargetControlID="tbSupportStaff"
        PopupControlID="pnlSupportStaff"
        Position="Bottom">
      </cc1:PopupControlExtender>
                                   
      <asp:Panel runat="server" ID="pnlSupportStaff">
         <asp:ListBox runat="server" ID="lstSupportStaff" AppendDataBoundItems="true" DataTextField="Name" DataValueField="ID" Width="250px" SelectionMode="Multiple">
         </asp:ListBox>
                                   
         <asp:Button runat="server" ID="btnSupportStaff" CausesValidation="false" OnClick="btnSupportStaff_ButtonClicked" Text="OK" />
      </asp:Panel>
      </ContentTemplate>
</asp:updatepanel>

The button click never fires. I know I have something simple wrong, just haven't figured it out yet
0
Comment
Question by:WaldaInc
4 Comments
 
LVL 11

Expert Comment

by:SAMIR BHOGAYTA
ID: 34894762
0
 
LVL 29

Accepted Solution

by:
Kumaraswamy R earned 500 total points
ID: 35815563
we can close the popup window

step 1:

Javascript Method:
function ClosePopup()
{
  $find("ClosePopup").hidePopup();
}

step 2:
Extender definition:
<ajaxToolkit:PopupControlExtender ID="PopupControlExtender1" runat="server"
   TargetControlID="DateTextBox" BehaviorID="ClosePopup"
   PopupControlID="PntMailList" Position="Bottom" />

step 3:

Call the method:
<a href="javascript:ClosePopup();">Close Popup Window</a>
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now