Go homepage(回首页) Upload pictures (上传图片) Write articles (发文字帖)
The author:(作者)delvpublished in(发表于) 2014/1/24 9:03:01 Asp.net,弹出对话框基类,(输出alet警告框)_[Asp.Net教程]
/############################################ 版权声明: 文章内容为本站编辑,创作.你可以任意转载、发布、使用但请务必以明文标注文章原始出处及本声明 http://www.opent.cn 作者:浪淘沙 ############################################/ using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Text; namespace EC { /// /// 信息输出通用方法 /// public class MessageObject { /// /// 一般输出 /// /// public static void Write(string str) { System.Web.HttpContext.Current.Response.Write(str); } /// /// 显示一段自定义的输出代码 /// /// /// public static void ShowJS(System.Web.UI.Page MyPage, string strCode) { StringBuilder sb = new StringBuilder(); sb.Append(""); MyPage.Response.Write(sb.ToString()); } /// /// 页面重载 /// public static void Location() { StringBuilder sb = new StringBuilder(); sb.Append(""); System.Web.HttpContext.Current.Response.Write(sb.ToString()); } /// /// 显示一个弹出窗口 /// /// public static void Show(string str) { StringBuilder sb = new StringBuilder(); sb.Append(""); System.Web.HttpContext.Current.Response.Write(sb.ToString()); } /// /// 显示一个弹出窗口,并关闭当前页 /// /// public static void ShowClose(string str) { System.Text.StringBuilder sb = new System.Text.StringBuilder(); sb.Append("\n"); System.Web.HttpContext.Current.Response.Write(sb.ToString()); } /// /// 显示一个弹出窗口,并转向当前页(刷新) /// /// public static void ShowLocation(string str) { StringBuilder sb = new StringBuilder(); sb.Append(""); System.Web.HttpContext.Current.Response.Write(sb.ToString()); } /// /// 显示一个弹出窗口,并转向目标页(导航) /// /// /// public static void ShowRedirect(string str, string url) { StringBuilder sb = new StringBuilder(); sb.Append(""); System.Web.HttpContext.Current.Response.Write(sb.ToString()); } /// /// 显示一个弹出窗口,并转向上一页 /// /// public static void ShowPre(string str) { StringBuilder sb = new StringBuilder(); sb.Append(""); System.Web.HttpContext.Current.Response.Write(sb.ToString()); } /// /// 重定向 /// /// public static void RedirectPage(string url) { string path = "http://" + System.Web.HttpContext.Current.Request.Url.Host + url; StringBuilder sb = new StringBuilder(); sb.Append(""); System.Web.HttpContext.Current.Response.Write(sb.ToString()); } } } Asp.net 弹出对话框基类 (输出alet警告框)
Asp.Net教程:/HtmlData/Program/Asp.Net/
赞