Asp.net 弹出对话框基类(输出alet警告框)

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警告框))