Click here to Skip to main content
12,634,407 members (25,173 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C#3.0 C#
I have set a modalpopup extender to display the item of a dropdowmlist in it.but upon clicking the button nothing is poping up..need help..
Asp:
<asp:Panel ID="Panel1" runat="server" CssClass="HellowWorldPopup" Width="320px" Style="display:none">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
        <asp:Button ID="Button1" runat="server" Style="display:none" />
        <asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server"
           TargetControlID="Button1" PopupControlID="Panel1" CancelControlID="CancelButton">
        </asp:ModalPopupExtender>
        <asp:Label ID="Label2" runat="server" />
        <asp:Button ID="OkButton" runat="server" Text="Ok" CausesValidation="true" />&nbsp;
           <asp:Button ID="CancelButton" runat="server" Text="Cancel" CausesValidation="false" />
</ContentTemplate>
</asp:UpdatePanel>
    </asp:Panel>

5.Next the next page, placed a Button and a TextBox like this:
<asp:TextBox ID="MyTextBox" runat="server" />
<asp:Button ID="MyButton" runat="server" Text="Popup" OnClick="MyButton_OnClick" />

6.and in the code behind for the page, i placed the handler for MyButton:
protected void MyButton_OnClick(object sender, EventArgs e)
{
     Label1.Text = MyTextBox.Text;
     UpdatePanel1.Update();
     ModalPopupExtender1.Show();
}
Posted 17-Sep-12 12:46pm
Updated 17-Sep-12 22:24pm
v2
Comments
Rickin Kane 17-Sep-12 20:58pm
   
i USERD THE SAME CODE OF URS AND THE POP UP IS SHOWING CORRECTLY , WHAT EXACTLY IS HAPPENING ON UR SIDE , PLEASE EXPLAN , CAUSE I CAN SEE TWO BUTTONS [OK] AND [CANCEL] WITH MYTEXTBOX.TEXT

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

1)Add to .aspx Page
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

2)Add
<asp:scriptmanager id="src" runat="server"></asp:scriptmanager>

inside form tag and then try

3)Add ajaxcontroltoolkit reference dll
  Permalink  
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.161208.2 | Last Updated 18 Sep 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100