/// <summary> /// 重置此字段的值(比如用来清空FileUpload的内容) /// </summary> public void Reset() { PageContext.RegisterStartupScript(GetResetReference()); }
/// <summary> /// 使控件获得焦点,并选中控件中的文本内容 /// </summary> /// <param name="selectText">是否选中控件中的文本内容</param> public void Focus(bool selectText) { PageContext.RegisterStartupScript(GetFocusReference(selectText)); }
/// <summary> /// 使控件获得焦点,并选中控件中的文本内容 /// </summary> /// <param name="selectText">是否选中控件中的文本内容</param> /// <param name="delayMilliseconds">使控件获得焦点前延迟的毫秒数</param> public void Focus(bool selectText, int delayMilliseconds) { PageContext.RegisterStartupScript(GetFocusReference(selectText, delayMilliseconds)); }
/// <summary> /// 使控件获得焦点 /// </summary> public new void Focus() { PageContext.RegisterStartupScript(GetFocusReference()); }
/// <summary> /// 在顶层窗口中显示对话框 /// </summary> /// <param name="message">对话框消息</param> /// <param name="title">对话框标题</param> /// <param name="icon">对话框消息图标</param> /// <param name="okScript">点击确定按钮执行的客户端脚本</param> /// <param name="cancelScript">点击取消按钮执行的客户端脚本</param> public static void ShowInTop(string message, string title, MessageBoxIcon icon, string okScript, string cancelScript) { PageContext.RegisterStartupScript(GetShowInTopReference(message, title, icon, okScript, cancelScript)); }
//private string _iconUrl; ///// <summary> ///// 自定义对话框图标地址 ///// </summary> //public string IconUrl //{ // get { return _iconUrl; } // set { _iconUrl = value; } //} //private Icon _icon = Icon.None; ///// <summary> ///// 自定义对话框图标 ///// </summary> //public Icon Icon //{ // get { return _icon; } // set { _icon = value; } //} /// <summary> /// 显示对话框 /// </summary> public void Show() { //Show(Message, Title, MessageBoxIcon, OkScript, Target, Icon, IconUrl); PageContext.RegisterStartupScript(this.GetShowReference()); }
/// <summary> /// 刷新面板中的IFrame页面 /// </summary> public void RefreshIFrame() { PageContext.RegisterStartupScript(GetRefreshIFrameReference()); }
/// <summary> /// 显示消息框 /// </summary> /// <param name="message"></param> /// <param name="title"></param> /// <param name="icon"></param> public static void Show(string message, string title, MessageBoxIcon icon) { PageContext.RegisterStartupScript(GetShowReference(message, title, icon)); }