------------------------------------------------------------------------------------------
指定触发弹窗事件--杂项--PopupElementID="触发事件ID"
关闭弹窗--杂项--CloseAction=CloseButton
1.如果需要弹窗在屏幕正中央,设置
杂项----PopupHorizontalAlign和PopupVerticalAlign都为WindowCenter即可
代码
ASPxPopupControl.PopupHorizontalAlign = DevExpress.Web.ASPxClasses.PopupHorizontalAlign.WindowCenter; ASPxPopupControl.PopupVerticalAlign = DevExpress.Web.ASPxClasses.PopupVerticalAlign.WindowCenter;这样就可以了
2.弹窗变为模态窗
行为-----modal为true
/// <summary>
/// 显示消息提示框
/// </summary>
/// <param name="message"></param>
void showMessage(string message)
{
PopupWindow pw = new PopupWindow(message);
pw.ContentStyle.ForeColor = System.Drawing.Color.Red;//红色
pw.ContentStyle.Font.Size = FontUnit.Large;//字体大小
pw.ShowOnPageLoad = true;//这句要在后台代码中写出来才生效
this.ASPxPopupControl1.Windows.Add(pw);
}
-----------------------------------------------------------------------
/// 显示消息提示框
/// </summary>
/// <param name="message"></param>
void showMessage(string message)
{
PopupWindow pw = new PopupWindow(message);
pw.ContentStyle.ForeColor = System.Drawing.Color.Red;//红色
pw.ContentStyle.Font.Size = FontUnit.Large;//字体大小
pw.ShowOnPageLoad = true;//这句要在后台代码中写出来才生效
this.ASPxPopupControl1.Windows.Add(pw);
}