天天躁日日躁狠狠躁AV麻豆-天天躁人人躁人人躁狂躁-天天澡夜夜澡人人澡-天天影视香色欲综合网-国产成人女人在线视频观看-国产成人女人视频在线观看

Asp.net 彈出對(duì)話框基類(輸出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
{
/// <summary>
/// 信息輸出通用方法
/// </summary>
public class MessageObject
{
/// <summary>
/// 一般輸出
/// </summary>
/// <param name="str"></param>
public static void Write(string str)
{
System.Web.HttpContext.Current.Response.Write(str);
}
/// <summary>
/// 顯示一段自定義的輸出代碼
/// </summary>
/// <param name="MyPage"></param>
/// <param name="strCode"></param>
public static void ShowJS(System.Web.UI.Page MyPage, string strCode)
{
StringBuilder sb = new StringBuilder();
sb.Append("<script language=/"Javascript/"> /n");
sb.Append(strCode.Trim());
sb.Append("</script>");
MyPage.Response.Write(sb.ToString());
}
/// <summary>
/// 頁面重載
/// </summary>
public static void Location()
{
StringBuilder sb = new StringBuilder();
sb.Append("<script language=/"Javascript/"> /n");
sb.Append("window.location.href=window.location.href;");
sb.Append("</script>");
System.Web.HttpContext.Current.Response.Write(sb.ToString());
}
/// <summary>
/// 顯示一個(gè)彈出窗口
/// </summary>
/// <param name="str"></param>
public static void Show(string str)
{
StringBuilder sb = new StringBuilder();
sb.Append("<script language=/"Javascript/"> /n");
sb.Append("alert(/"" + str.Trim() + "/"); /n");
sb.Append("</script>");
System.Web.HttpContext.Current.Response.Write(sb.ToString());
}
/// <summary>
/// 顯示一個(gè)彈出窗口,并關(guān)閉當(dāng)前頁
/// </summary>
/// <param name="str"></param>
public static void ShowClose(string str)
{
System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.Append("<script language=/"Javascript/">/n");
sb.Append("alert(/"" + str.Trim() + "/"); /n");
sb.Append("window.close();/n");
sb.Append("</script>/n");
System.Web.HttpContext.Current.Response.Write(sb.ToString());
}
/// <summary>
/// 顯示一個(gè)彈出窗口,并轉(zhuǎn)向當(dāng)前頁(刷新)
/// </summary>
/// <param name="str"></param>
public static void ShowLocation(string str)
{
StringBuilder sb = new StringBuilder();
sb.Append("<script language=/"Javascript/"> /n");
sb.Append("alert(/"" + str.Trim() + "/"); /n");
sb.Append("window.location.href=window.location.href;/n");
sb.Append("</script>");
System.Web.HttpContext.Current.Response.Write(sb.ToString());
}
/// <summary>
/// 顯示一個(gè)彈出窗口,并轉(zhuǎn)向目標(biāo)頁(導(dǎo)航)
/// </summary>
/// <param name="str"></param>
/// <param name="url"></param>
public static void ShowRedirect(string str, string url)
{
StringBuilder sb = new StringBuilder();
sb.Append("<script language=/"Javascript/"> /n");
sb.Append("alert(/"" + str.Trim() + "/"); /n");
sb.Append("window.location.href=/"" + url.Trim() + "/";/n");
sb.Append("</script>");
System.Web.HttpContext.Current.Response.Write(sb.ToString());
}
/// <summary>
/// 顯示一個(gè)彈出窗口,并轉(zhuǎn)向
/// </summary>
/// <param name="str"></param>
public static void ShowPre(string str)
{
StringBuilder sb = new StringBuilder();
sb.Append("<script language=/"Javascript/"> /n");
sb.Append("alert(/"" + str.Trim() + "/"); /n");
sb.Append("var p=document.referrer; /n");
sb.Append("window.location.href=p;/n");
sb.Append("</script>");
System.Web.HttpContext.Current.Response.Write(sb.ToString());
}
/// <summary>
/// 重定向
/// </summary>
/// <param name="url"></param>
public static void RedirectPage(string url)
{
string path = "http://" + System.Web.HttpContext.Current.Request.Url.Host + url;
StringBuilder sb = new StringBuilder();
sb.Append("<script language=/"Javascript/"> /n");
sb.Append(string.Format("window.location.href='{0}';", @path));
sb.Append("</script>");
System.Web.HttpContext.Current.Response.Write(sb.ToString());
}
}
}

AspNet技術(shù)Asp.net 彈出對(duì)話框基類(輸出alet警告框),轉(zhuǎn)載需保留來源!

鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請(qǐng)第一時(shí)間聯(lián)系我們修改或刪除,多謝。

主站蜘蛛池模板: 在线观看中文字幕码2021不用下载 | 国产精品久久久久永久免费看 | 亚洲XXX午休国产熟女屁 | 四虎影院网红美女 | 美女叉腿掰阴大胆艺术照 | 99精品视频在线免费观看 | 紧致肉肉高h | 男女后进式猛烈xx00动态图片 | 亚洲AV人无码综合在线观看蜜桃 | 国产人A片777777久久 | 国产精品久久久久精品A片软件 | 欧美性猛交AAA片免费观看 | 暖暖视频免费观看视频 | 99国产精品久久久久久久日本竹 | 最近最新中文字幕MV高清在线 | 两个人的视频hd全免费 | 国产成人刺激视频在线观看 | 欧美性受xxxx狂喷水 | 精品国产午夜福利在线观看蜜月 | 欧美巨大xxxx做受孕妇视频 | 我强进了老师身体在线观看 | 亚洲中文字幕国产综合 | 亚洲AV无码影院在线播放 | 暖暖视频在线观看高清... | 亚洲精品国产高清不卡在线 | FREEHDXXXX学生妹 | 精品国产乱码久久久久久免费 | 国产99久久久国产精品成人 | 青青草干免费线观看 | 高h乱一受多攻男男 | 无码国产欧美日韩精品 | 国产99精品视频一区二区三区 | 亚洲综合日韩在线2019 | 亚洲第一天堂无码专区 | 理论片午午伦夜理片2021 | 神马伦理2019影院不卡片 | WWW国产无套内射久久 | 九九影院午夜理论片无码 | 2022国产麻豆剧传媒剧情 | 成人国产在线视频 | 国产国拍亚洲精品永久软件 |