0

I am new to asp.net. I have been fighting for a while now and can't get a simple popup to work. All I want to do is have a button display a small window with some text in it for the user to read.

<div id="leftColumn">
        <asp:Button ID="Button1" runat="server" Text="Click For Window"  />

        <asp:Panel ID="Panel1" runat="server" CssClass="popupControl">

            <p>TEST Stuff. Lorem Ipsum textum fillum spaceum.</p>

        </asp:Panel>

    <asp:PopupControlExtender ID="PopupControlExtender1" runat="server" 
      TargetControlID="Button1" 
      PopupControlID="Panel1"  >
    </asp:PopupControlExtender>
 </div>

The css file contains "visibility:hidden;" for Panel1. I run the page, and click the button and get nothing. I also tried in-line with visible="false" with a codebehind that on click, changes to Visible=true.

Thanks for any reply.

DBguy
  • 33
  • 1
  • 1
  • 4

1 Answers1

0

Try this one :

    <asp:HiddenField ID="HiddenField1" runat="server" />
            <asp:ModalPopupExtender ID="MyPopup" runat="server" PopupControlID="Panel1" DynamicServicePath="" Enabled="True" TargetControlID="HiddenField1">

    <asp:Button ID="Button1" runat="server" Text="Click For Window" OnClick="Button1_Click" />
     <div>
      <asp:Panel ID="Panel1" runat="server" CssClass="popupControl">
        <p>TEST Stuff. Lorem Ipsum textum fillum spaceum.</p>

     </asp:Panel>

and on Button1_Click event add

  MyPopup.Show();
Aniket
  • 181
  • 10
  • Does not work, unfortunately. I am genuinely stumped. This should not be this difficult. I have tried it so many different ways based on so many things. – DBguy May 09 '14 at 13:32