一个ASP.NET中使用的MessageBox类

所属分类: 网络编程 / ASP.NET 阅读数: 340
收藏 0 赞 0 分享
 /// <summary>
 /// 自定义信息对话框
 /// </summary>
 public class MessageBox
 {
  /// <summary>
  /// 定义一个web页面,用来显示用户自定错误提示信息
  /// </summary>
  System.Web.UI.Page p;
  /// <summary>
  /// 实例时,参数为:this 如:MessageBox MB=new MessageBox(this);
  /// </summary>
  /// <param name="Page">此参数为:this</param>
  public  MessageBox(System.Web.UI.Page Page)
  {
   p=Page; //创建页面
  }
  /// <summary>
  /// 显示对话框
  /// </summary>
  /// <param name="message">提示信息</param>
  public void Show(string message)
  {
   string  script="<script> alert('"+ message +"')</script>";
   p.Response.Write(script);
  }
 }
更多精彩内容其他人还在看

Asp.net中的mail的发送

Asp.net中的mail的发送
收藏 0 赞 0 分享

用ASP.Net实现文件的在线压缩和解压缩

用ASP.Net实现文件的在线压缩和解压缩
收藏 0 赞 0 分享

ASP.NET中文件上传下载方法集合

ASP.NET中文件上传下载方法集合
收藏 0 赞 0 分享

ASP.NET通过Remoting service上传文件

ASP.NET通过Remoting service上传文件
收藏 0 赞 0 分享

ASP.NET2.0服务器控件之Render方法

ASP.NET2.0服务器控件之Render方法
收藏 0 赞 0 分享

ASP.NET2.0 WebRource,开发微调按钮控件

ASP.NET2.0 WebRource,开发微调按钮控件
收藏 0 赞 0 分享

ASP.NET2.0新特性概述

ASP.NET2.0新特性概述
收藏 0 赞 0 分享

介绍几个ASP.NET中容易忽略但却很重要的方法函数

介绍几个ASP.NET中容易忽略但却很重要的方法函数
收藏 0 赞 0 分享

asp.net2.0如何加密数据库联接字符串

asp.net2.0如何加密数据库联接字符串
收藏 0 赞 0 分享

用.NET 2.0压缩/解压功能处理大型数据

用.NET 2.0压缩/解压功能处理大型数据
收藏 0 赞 0 分享
查看更多