<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
<style type="text/css">
.ModalPopupBG
{
background-color: #666699;
filter: alpha(opacity=50);
opacity: 0.7;
}
.HellowWorldPopup
{
min-width:200px;
min-height:150px;
background:white;
}
</style>
<asp:button id="Button1" runat="server" text="Button" />
<ajx:modalpopupextender id="ModalPopupExtender1" runat="server"
cancelcontrolid="btnCancel" okcontrolid="btnOkay"
targetcontrolid="Button1" popupcontrolid="Panel1"
popupdraghandlecontrolid="PopupHeader" drag="true"
backgroundcssclass="ModalPopupBG">
</ajx:modalpopupextender>
<asp:panel id="Panel1" style="display: none" runat="server">
<div class="HellowWorldPopup">
<div class="PopupHeader" id="PopupHeader">Header</div>
<div class="PopupBody">
<p>This is a simple modal dialog</p>
</div>
<div class="Controls">
<input id="btnOkay" type="button" value="Done" />
<input id="btnCancel" type="button" value="Cancel" />
</div>
</div>
</asp:panel>
</asp:Content>
我已将上述代码放在sharepoint中,我还更改了母版页中的ajaxtoolkit scriptmanager。但仍然代码不起作用。我在.net平台上试过它工作正常。
答案 0 :(得分:0)
现在我已经解决了这个问题,因为我使用的是Ajaxtoolkit 3.5和sharepoint 2010.由于使用4.0 .Net版本构建的4.0 .Net版本和工具包,因此有一个兼容性问题,因此我提到了Ajaxtoolkit 3.0。问题已解决