//在窗口关闭或隐藏时,清楚文本框中的内容(核心代码)
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. Python的平凡之路(10)

    异步IO 数据库 队列 缓存 1.Gevent协程 定义:用户态的轻量级线程.协程拥有自己的寄存器上下文和栈.协程调度切换时,将寄存器上下文和栈保存到其他地方,在切回来的时候,恢复先前保存的寄存器上下 ...

  2. 解决Only a type can be imported. com.mysql.jdbc.Connection resolves to a package的报错问题

    写jsp加载数据驱动以后老是提示Only a type can be imported. com.mysql.jdbc.Connection resolves to a package的错误,然而改成 ...

  3. hdu 2059

    ps:终于解决了....卡了我好久.最后用了DP.然后还有记忆化搜索优化了一下.终于AC了 思路:要计算dp[n](就是到第n个站的最短时间,也就是最优方案),必须知道dp[0]到dp[n-1] 设j ...

  4. Javascript笔记一

    Javascript: ECMAscript :相当于翻译器 翻译电脑于代码  解释器 DOM document object model  文档 对象 模型  --->document  获取 ...

  5. Linux下使用yum安装MariaDB

    版本:centos7 Linux下安装MariaDB官方文档参见:https://mariadb.com/kb/zh-cn/installing-mariadb-with-yum/ 1.创建Maria ...

  6. php-访问数据库

    建一个连接,造一个连接对象 $db = new MySQLi("host","username","passwd","databa ...

  7. sscanf格式化输出

    char DesChar[20] = {0}; char* SouChar= "1cZCD23456abEFdedfB"; sscanf(SouChar,"%[^A-Z] ...

  8. mysql添加外键

    语法:alter table 表名 add constraint FK_ID foreign key(你的外键字段名) REFERENCES 外表表名(对应的表的主键字段名); 例: alter ta ...

  9. JavaScript对象属性赋值操作的逻辑

    对象进行属性赋值操作时,其执行逻辑如下所示: 1. 当前对象中是否有该属性?有,进行赋值操作:没有,进行下一步判断. 2. 对象的原型链中是否有该属性?没有,在当前对象上创建该属性,并赋值:有,进行下 ...

  10. Notepad++配置Python开发环境

    1. 安装Python 1 下载 我选择了32位的2.7版本.https://www.python.org/ftp/python/2.7.8/python-2.7.8.msi 2. 安装 安装的时候可 ...