Ajax.net ModalPopup控件

文/vincent 出处:csdn.net

功能:
使用时,会使整个屏幕都会是灰色的,只有一个"模式"对话框可以操作. ModalPopup是一个扩展控件,它建立在已经存在panel等容器控件的基础上,而panel上可以放置任何控件,panel的样式也是自定义的. 当控件使用时, 点击panel之外的操作都是无效的.

属性:

 附件: 您所在的用户组无法下载或查看附件


代码实例
主要代码如下:

<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
asp:ScriptManager>
<asp:Panel ID="Panel1" runat="server">

ASP.NET AJAX is a free framework for building a new generation of richer, more interactive, highly personalized cross-browser web applications. This new web development technology from Microsoft integrates cross-browser client script libraries with the ASP.NET 2.0 server-based development framework. In addition, ASP.NET AJAX offers you the same type of development platform for client-based web pages that ASP.NET offers for server-based pages. And because ASP.NET AJAX is an extension of ASP.NET, it is fully integrated with server-based services. ASP.NET AJAX makes it possible to easily take advantage of AJAX techniques on the web and enables you to create ASP.NET pages with a rich, responsive UI and server communication. However, AJAX isn't just for ASP.NET. You can take advantage of the rich client framework to easily build client-centric web applications that integrate with any backend data provider and run on most modern browsers.
asp:Panel>

<asp:LinkButton ID="btnChangeStyle" runat="server" ToolTip="Click here to change the paragraph style" >Click here to change the paragraph styleasp:LinkButton>

<asp:Panel ID="panModalPopup" runat="server"
CssClass="cssModalPopup"
Style="display: none">
<table cellspacing="10" width="100%">
<tr align="center">
<td colspan="2">
请选择您喜欢的样式:
td>
tr>
<tr>
<td colspan="2">
<input id="Radio1" type="radio" name="Radio"  />
<label class="cssStyle1" for="Radio1" style="padding: 3px;">
选用这个样式。
label>
td>
tr>
<tr>
<td colspan="2">
<input id="Radio2" type="radio" name="Radio"  />
<label class="cssStyle2" for="Radio2" style="padding: 3px">
选用这个样式。
label>
td>
tr>
<tr>
<td colspan="2">
<input id="Radio3" name="Radio"  type="radio" />
<label class="cssStyle3" for="Radio3" style="padding: 3px;">
选用这个样式。
label>
td>
tr>
<tr>
<td colspan="2">
<input id="Radio4" name="Radio"  type="radio" />
<label class="cssStyle4" for="Radio4" style="padding: 3px;">
选用这个样式。
label>
td>
tr>
<tr Align="center">
<td>
<asp:Button ID="btnOK" runat="server" Text="确定" />
td>
<td>
<asp:Button ID="btnCancel" runat="server" Text="取消" />
td>
tr>
table>
asp:Panel>

<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server"
TargetC
PopupC
BackgroundCssClass="cssModalBackground"
DropShadow="true"
OkC

CancelC>
ajaxToolkit:ModalPopupExtender>
form>

运行结果:

 附件: 您所在的用户组无法下载或查看附件


 附件: 您所在的用户组无法下载或查看附件

 感谢原创者的辛勤劳动,希望对您有所帮助,转载请注明原出处。
 您可能对 [Ajax] 的这些文章也感兴趣:

AJAX开发工具Atlas:实现机制浅析(二)
SOA硬件与Ajax
AJAX 数据表格控件大全
Ajax Control Toolkit for .NET3.5 SP1 Released
谈AJAX的安全性及AJAX安全隐患
AJAX开发工具对比(仅限.net环境)
VS 2008中ASP.NET AJAX的新应用程序服务:Role Application Service
ASP.NET AJAX中的非同步PageMethod调用
Ajax教程:注册应用
10分钟图解ASP.NET AJAX 1.0 RC开发