views:

32

answers:

1

Hello I'm not able to get my panel popup using ModalPopupExtender. Here's the code

.modalBackground
{
  background-color:#CCCCFF;
  filter:alpha(opacity=40);
  display:none;
  opacity:0.5;
}
.ModalWindow
{
  border: solid1px#c0c0c0;
  background:#f0f0f0;
  padding: 0px 10px 10px 10px;
  position:absolute;
  top:-1000px;
  left:-1000;
}

And the code:

<asp:ScriptManager runat="server">
</asp:ScriptManager>
<asp:UpdatePanel runat="server">
    <ContentTemplate>
        <asp:Panel ID="panEdit" runat="server" Height="180px" Width="400px" CssClass="modalBackground">
            Content goes here
            <asp:Button ID="btnCancel" runat="server" Text="Cancel" />
        </asp:Panel>
        <asp:LinkButton runat="server" ID="btnPopup" Text="pop" />
        <asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" RepositionMode="RepositionOnWindowResize"
            TargetControlID="btnPopup" PopupControlID="panEdit" BackgroundCssClass="modalBackground"
            CancelControlID="btnCancel">
        </asp:ModalPopupExtender>
    </ContentTemplate>
</asp:UpdatePanel>

When I click btnPopup, nothing happens. Any idea?

+1  A: 

Where did you get this code ? With this parameters on css I do not think that you ever see a modal.

 top:-1000px;
 left:-1000;

Anyway I think that you must follow the example that give by MS and just copy/paste and work on that example. The example is totally different from you.

get the sdk from http://www.asp.net/ajaxlibrary/download.ashx and then search on the examples for the ModalPopUp

Aristos