一个ASP.NET中使用的MessageBox类
生活随笔
收集整理的這篇文章主要介紹了
一个ASP.NET中使用的MessageBox类
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
/// <summary>
?/// 自定義信息對(duì)話框
?/// </summary>
?public class MessageBox
?{
? /// <summary>
? /// 定義一個(gè)web頁(yè)面,用來(lái)顯示用戶自定錯(cuò)誤提示信息
? /// </summary>
? System.Web.UI.Page p;
? /// <summary>
? /// 實(shí)例時(shí),參數(shù)為:this 如:MessageBox MB=new MessageBox(this);
? /// </summary>
? /// <param name="Page">此參數(shù)為:this</param>
? public? MessageBox(System.Web.UI.Page Page)
? {
?? p=Page; //創(chuàng)建頁(yè)面
? }
? /// <summary>
? /// 顯示對(duì)話框
? /// </summary>
? /// <param name="message">提示信息</param>
? public void Show(string message)
? {
?? string? script="<script> alert('"+ message +"')</script>";
?? p.Response.Write(script);
? }
?}??
?/// 自定義信息對(duì)話框
?/// </summary>
?public class MessageBox
?{
? /// <summary>
? /// 定義一個(gè)web頁(yè)面,用來(lái)顯示用戶自定錯(cuò)誤提示信息
? /// </summary>
? System.Web.UI.Page p;
? /// <summary>
? /// 實(shí)例時(shí),參數(shù)為:this 如:MessageBox MB=new MessageBox(this);
? /// </summary>
? /// <param name="Page">此參數(shù)為:this</param>
? public? MessageBox(System.Web.UI.Page Page)
? {
?? p=Page; //創(chuàng)建頁(yè)面
? }
? /// <summary>
? /// 顯示對(duì)話框
? /// </summary>
? /// <param name="message">提示信息</param>
? public void Show(string message)
? {
?? string? script="<script> alert('"+ message +"')</script>";
?? p.Response.Write(script);
? }
?}??
總結(jié)
以上是生活随笔為你收集整理的一个ASP.NET中使用的MessageBox类的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 求一个微信最霸气的个性签名!
- 下一篇: ASP.NET中使用MD5和SHA1算法