//在窗口关闭或隐藏时,清楚文本框中的内容(核心代码)
function(s, e) { ASPxClientEdit.ClearGroup('entryGroup'); }

<asp:Content ID="Content1" ContentPlaceHolderID="ContentHolder" runat="Server">
<script type="text/javascript">
// <![CDATA[
function ShowLoginWindow() {
pcLogin.Show();
}
function ShowCreateAccountWindow() {
pcCreateAccount.Show();
tbUsername.Focus();
}
// ]]>
</script>
<div style="margin: 16px auto; width: 160px;">
<dx:ASPxButton ID="btShowModal" runat="server" Text="Show Modal Window" AutoPostBack="False" UseSubmitBehavior="false" Width="100%">
<ClientSideEvents Click="function(s, e) { ShowLoginWindow(); }" />
</dx:ASPxButton>
</div>
<dx:ASPxPopupControl ID="pcLogin" runat="server" CloseAction="CloseButton" Modal="True"
PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" ClientInstanceName="pcLogin"
HeaderText="Login" AllowDragging="True" PopupAnimationType="None" EnableViewState="False">
<ClientSideEvents PopUp="function(s, e) { ASPxClientEdit.ClearGroup('entryGroup'); tbLogin.Focus(); }" />
<ContentCollection>
<dx:PopupControlContentControl runat="server">
<dx:ASPxPanel ID="Panel1" runat="server" DefaultButton="btOK">
<PanelCollection>
<dx:PanelContent runat="server">
<table>
<tr>
<td rowspan="">
<div class="pcmSideSpacer">
</div>
</td>
<td class="pcmCellCaption">
<dx:ASPxLabel ID="lblUsername1" runat="server" Text="Username:" AssociatedControlID="tbLogin">
</dx:ASPxLabel>
</td>
<td class="pcmCellText">
<dx:ASPxTextBox ID="tbLogin" runat="server" Width="150px" ClientInstanceName="tbLogin">
<ValidationSettings EnableCustomValidation="True" ValidationGroup="entryGroup" SetFocusOnError="True"
ErrorDisplayMode="Text" ErrorTextPosition="Bottom" CausesValidation="True">
<RequiredField ErrorText="Username required" IsRequired="True" />
<RegularExpression ErrorText="Login required" />
<ErrorFrameStyle Font-Size="10px">
<ErrorTextPaddings PaddingLeft="0px" />
</ErrorFrameStyle>
</ValidationSettings>
</dx:ASPxTextBox>
</td>
<td rowspan="">
<div class="pcmSideSpacer">
</div>
</td>
</tr>
<tr>
<td class="pcmCellCaption" >
<dx:ASPxLabel ID="lblPass1" runat="server" Text="Password:" AssociatedControlID="tbPassword">
</dx:ASPxLabel>
</td>
<td class="pcmCellText">
<dx:ASPxTextBox ID="tbPassword" runat="server" Width="150px" Password="True">
<ValidationSettings EnableCustomValidation="True" ValidationGroup="entryGroup" SetFocusOnError="True"
ErrorDisplayMode="Text" ErrorTextPosition="Bottom">
<RequiredField ErrorText="Password required" IsRequired="True" />
<ErrorFrameStyle Font-Size="10px">
<ErrorTextPaddings PaddingLeft="0px" />
</ErrorFrameStyle>
</ValidationSettings>
</dx:ASPxTextBox>
</td>
</tr>
<tr>
<td>
</td>
<td class="pcmCheckBox">
<dx:ASPxCheckBox ID="chbRemember" runat="server" Text="Remember me">
</dx:ASPxCheckBox>
</td>
</tr>
<tr>
<td colspan="">
<div class="pcmButton">
<dx:ASPxButton ID="btOK" runat="server" Text="OK" Width="80px" AutoPostBack="False" style="float: left; margin-right: 8px">
<ClientSideEvents Click="function(s, e) { if(ASPxClientEdit.ValidateGroup('entryGroup')) pcLogin.Hide(); }" />
</dx:ASPxButton>
<dx:ASPxButton ID="btCancel" runat="server" Text="Cancel" Width="80px" AutoPostBack="False" style="float: left; margin-right: 8px">
<ClientSideEvents Click="function(s, e) { pcLogin.Hide(); }" />
</dx:ASPxButton>
</div>
</td>
</tr>
</table>
</dx:PanelContent>
</PanelCollection>
</dx:ASPxPanel>
<div>
<a href="javascript:ShowCreateAccountWindow();" id="hl1" style="float: right; margin: 14px 0 10px 0;">
Create Account</a>
</div>
</dx:PopupControlContentControl>
</ContentCollection>
<ContentStyle>
<Paddings PaddingBottom="5px" />
</ContentStyle>
</dx:ASPxPopupControl>
<dx:ASPxPopupControl ID="pcCreateAccount" runat="server" CloseAction="CloseButton"
PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" ClientInstanceName="pcCreateAccount"
HeaderText="Create Account" AllowDragging="True" Modal="True" PopupAnimationType="Fade"
EnableViewState="False" PopupHorizontalOffset="" PopupVerticalOffset="">
<ClientSideEvents PopUp="function(s, e) { ASPxClientEdit.ClearGroup('createAccountGroup'); }" />
<SizeGripImage Width="11px" />
<ContentCollection>
<dx:PopupControlContentControl runat="server">
<dx:ASPxPanel ID="Panel2" runat="server" DefaultButton="btCreate">
<PanelCollection>
<dx:PanelContent runat="server">
<table>
<tr>
<td rowspan="">
<div class="pcmSideSpacer">
</div>
</td>
<td class="pcmCellCaption" >
<dx:ASPxLabel ID="lblUsername2" runat="server" Text="Username:" AssociatedControlID="tbUsername">
</dx:ASPxLabel>
</td>
<td class="pcmCellText">
<dx:ASPxTextBox ID="tbUsername" runat="server" Width="150px" ClientInstanceName="tbUsername">
<ValidationSettings EnableCustomValidation="True" ValidationGroup="createAccountGroup"
SetFocusOnError="True" ErrorDisplayMode="Text" ErrorTextPosition="Bottom">
<RequiredField IsRequired="True" ErrorText="Username is required" />
<ErrorFrameStyle Font-Size="10px">
<ErrorTextPaddings PaddingLeft="0px" />
</ErrorFrameStyle>
</ValidationSettings>
</dx:ASPxTextBox>
</td>
<td rowspan="">
<div class="pcmSideSpacer">
</div>
</td>
</tr>
<tr>
<td class="pcmCellCaption" >
<dx:ASPxLabel ID="lblPass2" runat="server" Text="Password:" AssociatedControlID="tbPass1">
</dx:ASPxLabel>
</td>
<td class="pcmCellText">
<dx:ASPxTextBox ID="tbPass1" runat="server" Width="150px" ClientInstanceName="pass1"
Password="True">
<ValidationSettings EnableCustomValidation="True" ValidationGroup="createAccountGroup"
SetFocusOnError="True" ErrorDisplayMode="Text" ErrorTextPosition="Bottom">
<RequiredField IsRequired="True" ErrorText="Password is required" />
<ErrorFrameStyle Font-Size="10px">
<ErrorTextPaddings PaddingLeft="0px" />
</ErrorFrameStyle>
</ValidationSettings>
</dx:ASPxTextBox>
</td>
</tr>
<tr>
<td class="pcmCellCaption" >
<dx:ASPxLabel ID="lblConfPass2" runat="server" Text="Confirm password:" AssociatedControlID="tbConfPass2">
</dx:ASPxLabel>
</td>
<td class="pcmCellText">
<dx:ASPxTextBox ID="tbConfPass2" runat="server" Width="150px" ClientInstanceName="pass2"
Password="True">
<ValidationSettings EnableCustomValidation="True" ValidationGroup="createAccountGroup"
SetFocusOnError="True" ErrorText="Password is incorrect" ErrorDisplayMode="Text"
ErrorTextPosition="Bottom">
<RequiredField IsRequired="True" ErrorText="Please, confirm your password" />
<ErrorFrameStyle Font-Size="10px">
<ErrorTextPaddings PaddingLeft="0px" />
</ErrorFrameStyle>
</ValidationSettings>
<ClientSideEvents Validation="function(s, e) { e.isValid = (pass1.GetText()==pass2.GetText()); }" />
</dx:ASPxTextBox>
</td>
</tr>
<tr>
<td class="pcmCellCaption" >
<dx:ASPxLabel ID="lblEmail" runat="server" Text="Email:" AssociatedControlID="tbEmail">
</dx:ASPxLabel>
</td>
<td class="pcmCellText">
<dx:ASPxTextBox ID="tbEmail" runat="server" Width="150px">
<ValidationSettings EnableCustomValidation="True" ValidationGroup="createAccountGroup"
SetFocusOnError="True" ErrorDisplayMode="Text" ErrorTextPosition="Bottom">
<RequiredField IsRequired="True" ErrorText="E-mail is required" />
<RegularExpression ErrorText="Invalid e-mail" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" />
<ErrorFrameStyle Font-Size="10px">
<ErrorTextPaddings PaddingLeft="0px" />
</ErrorFrameStyle>
</ValidationSettings>
</dx:ASPxTextBox>
</td>
</tr>
<tr>
<td colspan="">
<div class="pcmButton">
<dx:ASPxButton ID="btCreate" runat="server" Text="OK" Width="80px" AutoPostBack="False" style="float: left; margin-right: 8px">
<ClientSideEvents Click="function(s, e) {
if(ASPxClientEdit.ValidateGroup('createAccountGroup')) {
ASPxClientEdit.ClearGroup('entryGroup');
tbLogin.SetText(tbUsername.GetText());
pcCreateAccount.Hide();
}
}" />
</dx:ASPxButton>
<dx:ASPxButton ID="btCancel2" runat="server" Text="Cancel" Width="80px" AutoPostBack="False" style="float: left; margin-right: 8px">
<ClientSideEvents Click="function(s, e) { pcCreateAccount.Hide(); }" />
</dx:ASPxButton>
</div>
</td>
</tr>
</table>
</dx:PanelContent>
</PanelCollection>
</dx:ASPxPanel>
</dx:PopupControlContentControl>
</ContentCollection>
</dx:ASPxPopupControl>
</asp:Content>

DEV中dx:ASPxPopupControl 控件的使用(在窗口关闭或隐藏时,清楚文本框中的内容)的更多相关文章

  1. Bootstrap中datetimepicker日期控件1899年问题解决

    Bootstrap中datetimepicker日期控件1899年问题解决 最近在开发项目的过程中,遇到一个很尴尬的问题.我们项目一直采用的是angular+bootstrap,日期控件用的是boot ...

  2. 在网页中引用DWG控件,交互绘图,和响应鼠标点击对象的方法

    在网页中引用DWG控件,交互绘图,和响应鼠标点击对象的方法 [MXDRAW CAD控件文档] 下面帮助的完整例子,在控件安装目录的Sample\Ie\iedemo.htm中. 1.      主要用到 ...

  3. 在DevExpress程序中使用SplashScreenManager控件实现启动闪屏和等待信息窗口

    在我很早的WInform随笔<WinForm界面开发之"SplashScreen控件">有介绍如何使用闪屏的处理操作,不过那种是普通WInform和DevExpress ...

  4. 在WPF中使用WinForm控件方法

    1.      首先添加对如下两个dll文件的引用:WindowsFormsIntegration.dll,System.Windows.Forms.dll. 2.      在要使用WinForm控 ...

  5. wpf telerik中的book控件

    下载 telerik中的书本控件,仅供学习使用.

  6. [原创]在Framelayout中放置button控件出现的覆盖问题

    android Framelayout(帧布局)是很常用的布局,主要用来处理需要多个view叠加显示的情况. 然而在使用中,我发现Framelayout中的Button控件,会挡住所有其他控件,而不论 ...

  7. (转)客户端触发Asp.net中服务端控件事件

    第一章. Asp.net中服务端控件事件是如何触发的 Asp.net 中在客户端触发服务端事件分为两种情况: 一. WebControls中的Button 和HtmlControls中的Type为su ...

  8. 在web中使用windows控件,实现摄像头功能

    最近做的一个Web版的视频会议项目,需要在网页中播放来自远程摄像头采集的实时视频,我们已经有了播放远程实时视频的使用C#编写的windows控件,如何将其嵌入到网页中去了?这需要使用一种古老的技术,A ...

  9. WPF中的image控件的Source赋值

    WPF中的Image控件Source的设置 1.XAML中 简单的方式(Source="haha.png"); image控件的Source设置为相对路径后(Source=&quo ...

随机推荐

  1. JavaScript基础--小案例:在网页指定位置弹出错误信息(十二)

    案例分析:点击按钮后,在网页上指定区域,提示错误信息!5秒后,错误信息提示自动消失! <script languag="javascript" type="text ...

  2. NSAssert的使用

    NSAssert的使用   苹果在foundation.framework中定义了这么一个宏: #define NSAssert(condition, desc, ...)   第一个参数为一个条件判 ...

  3. uoot启动过程

    1.从我们的start_armboot开始讲起 u-boot整体由汇编段和C语言段外加连接脚本组成.关于汇编段请看我之前的博客<u-boot源码汇编段简要分析>,好,让我们进入start_ ...

  4. WCF 发布使用

    WCF发布,由于使用的是 net.tcp协议因此 需要在发布的WCF站点的管理网站-高级设置,连接协议中添加net.tcp的绑定 然后还需要在网站绑定编辑中添加net.tcp的绑定.否则访问的时候会出 ...

  5. IOS 不兼容 伪类active

    添加空的 事件ontouchstart 例 <body ontouchstart>

  6. 2016年中国大学生程序设计竞赛(合肥)-重现赛1009 HDU 5969

    最大的位或 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submi ...

  7. for循环相关

    循环语句是指令式编程的常见语句,Scala对其加以改进,成为适应函数式风格的利器. for循环中的变量,没有val或者var,是因为变量的类型,完全是集合中的元素的类型.作用域持续到括号结束. 在sc ...

  8. mysql -workbench : Error cause by ' sql-mode = only-full-group-by'

    当mysql出现"only-full-group-by"问题时,是mysql的sql_mode设置出现了问题. 解决: 1.  找到mysql的 my.cnf文件,我的文件路径是: ...

  9. animate.css 一些常用的CSS3动画效果

    大家已经开始在项目中使用一些CSS3动画效果了吧,这让网站在高端浏览器上看起来很上流.animate.css是一个老外做的各种CSS3动画的合集,比较全,也很炫,大家可以参考学习一下. 项目主页:ht ...

  10. Android Service初始

    一.Service概念 1.Service是一个应用程序组件 2.Service没有图像化界面 3.Service通常用来处理一些耗时比较长的操作 4.可以使用Service更新ContentProv ...