ajaxToolkit:ModalPopupExtender演示及實(shí)現(xiàn)代碼

演示例子中,是Repeater結(jié)合CheckBox進(jìn)行多選,此功能實(shí)現(xiàn),可以參考:http://www.dbjr.com.cn/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)文章
asp.net web頁(yè)面元素的多語(yǔ)言化(多國(guó)語(yǔ)化)實(shí)現(xiàn)分享
開(kāi)發(fā)的一些系統(tǒng),經(jīng)常要求支持多語(yǔ)言(例如日文,英文等),接下來(lái)介紹如何實(shí)現(xiàn)asp.net開(kāi)發(fā)中web頁(yè)面實(shí)現(xiàn)頁(yè)面元素的多語(yǔ)言化(多國(guó)語(yǔ)化)感興趣的朋友可以了解下,或許對(duì)你學(xué)習(xí)有所幫助2013-02-02基于ASP.NET實(shí)現(xiàn)單點(diǎn)登錄(SSO)的示例代碼
SSO英文全稱(chēng)Single?Sign?On(單點(diǎn)登錄)。SSO是在多個(gè)應(yīng)用系統(tǒng)中,用戶只需要登錄一次就可以訪問(wèn)所有相互信任的應(yīng)用系統(tǒng)。本文為大家分享了基于ASP.NET實(shí)現(xiàn)單點(diǎn)登錄(SSO)的示例代碼,需要的可以參考一下2022-05-05URLRewriter最簡(jiǎn)單入門(mén)介紹 URLRewriter相關(guān)資源
配置好后,查看日志看到的狀態(tài)都是200,IIS直接認(rèn)為這個(gè)文件是存在的了, 而不是301,或302,這在某些情況下可能會(huì)不適用,比如:搜索引擎優(yōu)化時(shí)目錄或文件調(diào)整。2008-07-07用javascript為DropDownList控件下拉式選擇添加一個(gè)Item至定義索引位置
用Javascript為DropDownList控件下拉式選擇添加一個(gè)Item至定義索引位置;準(zhǔn)備數(shù)據(jù),創(chuàng)建一個(gè)對(duì)象,將是存儲(chǔ)DropDownList控件每個(gè)Item數(shù)據(jù)2013-01-01Asp.net Core 1.1 升級(jí)后操作mysql出錯(cuò)的解決辦法
這篇文章主要介紹了Asp.net Core 1.1 升級(jí)后操作mysql出錯(cuò)的解決辦法,需要的朋友可以參考下2016-12-12GridView選擇記錄同時(shí)confirm用戶確認(rèn)刪除
confirm用戶確認(rèn)刪除是一個(gè)很實(shí)用的功能,比如可以防止用戶誤操作刪除等等,感興趣的朋友可以了解下,希望本文對(duì)你有所幫助,就當(dāng)鞏固知識(shí)了2013-01-01作業(yè)調(diào)度框架Quartz.net用法詳解
本文詳細(xì)講解了作業(yè)調(diào)度框架Quartz.net的用法,文中通過(guò)示例代碼介紹的非常詳細(xì)。對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2022-06-06