ajaxToolkit:ModalPopupExtender演示及實(shí)現(xiàn)代碼
演示例子中,是Repeater結(jié)合CheckBox進(jìn)行多選,此功能實(shí)現(xiàn),可以參考:http://www.dhdzp.com/article/33558.htm
選擇的小圖片,它將要被ajaxToolkit:ModalPopupExtender使用,因?yàn)樾枰O(shè)為服務(wù)控件,添加runat="server":
<img id="ab" runat="server" style="margin-left: 5px; margin-bottom: 30px;"
src="../Image/ab.gif" width="18" height="18" />
下面是Popup窗口的Html,不過(guò)Insus.NET已經(jīng)省略了Repeater控件內(nèi)的內(nèi)容,你在應(yīng)用時(shí),需要添加的你自己的,還是就是btnSelected_Click事件。
<asp:Panel ID="pnlPopupWindown" runat="server" Style="display: none; background-color: #ffffdd;
border-width: 3px; border-style: solid; border-color: Gray; padding: 3px; width: 500px;">
<asp:Panel ID="Panel3" runat="server" Style="float: left; margin-bottom: 5px; cursor: move;
background-color: #DDDDDD; border: solid 1px Gray; color: Black; height: 20px;
width: 475px; text-align: center; line-height: 20px;">
郵件地址列表
</asp:Panel>
<asp:Panel ID="Panel4" runat="server" Style="float: right; margin-bottom: 5px; background-color: #DDDDDD;
border: solid 1px Gray; color: Black; height: 20px; text-align: center; line-height: 20px;">
<asp:LinkButton ID="btnClose" runat="server" Style="margin-right: 4px; margin-left: 4px;"
OnClientClick="return false;" Text="×" ForeColor="Red" ToolTip="Close" />
</asp:Panel>
<div>
<asp:Panel ID="Panel1" runat="server" ScrollBars="Vertical" Height="198px" Width="100%"
BorderStyle="Solid" BorderWidth="1px" BorderColor="Gray">
<asp:Repeater ID="RepeaterEmailList" runat="server">
</asp:Repeater>
</asp:Panel>
<div style="height: 3px;">
</div>
<asp:Panel ID="Panel2" runat="server">
<asp:Button ID="btnSelected" runat="server" OnClick="btnSelected_Click" Text="插入"
CausesValidation="false" CssClass="button" />
</asp:Panel>
</div>
</asp:Panel>
<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="ab"
PopupControlID="pnlPopupWindown" BackgroundCssClass="modalBackground" CancelControlID="btnClose"
DropShadow="true" PopupDragHandleControlID="Panel3" />
<script type="text/javascript">
function setBodyHeightToContentHeight() {
document.body.style.height = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight) + "px";
}
setBodyHeightToContentHeight();
$addHandler(window, "resize", setBodyHeightToContentHeight);
</script>
最后是CSS樣式:
/*Modal Popup*/
.modalBackground
{
background-color: Gray;
filter: alpha(opacity=70);
opacity: 0.7;
}
- AjaxControlToolKit CalendarExtender(日歷擴(kuò)展控件)的使用方法
- asp.net AjaxControlToolKit--TabContainer控件的介紹
- jQuery插件-jRating評(píng)分插件源碼分析及使用方法
- ajaxToolkit:CalendarExtender演示與實(shí)現(xiàn)代碼
- ajaxToolkit:TextBoxWatermarkExtender演示與實(shí)現(xiàn)代碼
- ajaxToolkit:AccordionPane演示與應(yīng)用實(shí)例
- jquery插件star-rating.js實(shí)現(xiàn)星級(jí)評(píng)分特效
- Android控件之RatingBar自定義星級(jí)評(píng)分樣式
- Android App中使用RatingBar實(shí)現(xiàn)星級(jí)打分功能的教程
- AjaxToolKit之Rating控件的使用方法
相關(guān)文章
Silverlight融合ajax實(shí)現(xiàn)前后臺(tái)數(shù)據(jù)交互
兩年前Silverlight 還未起名,故事發(fā)生在WPF/E 的年代里。07年8月在中軟實(shí)習(xí)時(shí),我承擔(dān)起了在. Net 中嵌入WPF/E 的任務(wù),目的是增強(qiáng)用戶(hù)體驗(yàn)。2009-05-05
asp.net訪問(wèn)Access數(shù)據(jù)庫(kù)溢出錯(cuò)誤
asp.net訪問(wèn)Access數(shù)據(jù)庫(kù)溢出錯(cuò)誤,大家會(huì)的幫忙解決下啊。2009-07-07
ASP.Net開(kāi)發(fā)常見(jiàn)的一些問(wèn)題總結(jié)
ASP.Net開(kāi)發(fā)常見(jiàn)的一些問(wèn)題總結(jié),需要的朋友可以參考一下2013-02-02
ASP.NET郵件發(fā)送system.Net.Mail案例
這篇文章主要為大家詳細(xì)介紹了ASP.NET郵件發(fā)送system.Net.Mail案例,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2016-05-05
.net 中按.(點(diǎn))無(wú)法智能提示的bug解決方案
IDE按.無(wú)法智能提示,但是可以編譯并正常使用,在修改別人代碼bug時(shí)遇到的,接下來(lái)為你提供詳細(xì)解決方法,感興趣的你可以參考下哈2013-03-03
python scrapy項(xiàng)目下spiders內(nèi)多個(gè)爬蟲(chóng)同時(shí)運(yùn)行的實(shí)現(xiàn)
這篇文章主要介紹了python scrapy項(xiàng)目下spiders內(nèi)多個(gè)爬蟲(chóng)同時(shí)運(yùn)行的實(shí)現(xiàn),文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2021-04-04
ASP.NET?Core?Web?API中實(shí)現(xiàn)監(jiān)控的方法
本文介紹了在ASP.NETCoreWebAPI中實(shí)現(xiàn)監(jiān)控的幾種流行開(kāi)源工具,可以監(jiān)控API的性能、請(qǐng)求、響應(yīng)時(shí)間、錯(cuò)誤率等,具有一定的參考價(jià)值,感興趣的可以了解一下2025-01-01
Asp.net配合easyui實(shí)現(xiàn)返回json數(shù)據(jù)實(shí)例
這篇文章主要介紹了Asp.net配合easyui實(shí)現(xiàn)返回json數(shù)據(jù)的方法,實(shí)例分析了Asp.net配合easyui返回json數(shù)據(jù)時(shí)出現(xiàn)的問(wèn)題及解決方法,非常具有實(shí)用價(jià)值的技巧,需要的朋友可以參考下2014-12-12

