简单的封装一个HTML 弹出对话框的空间

ExpandedBlockStart.gif 代码
using  System;
using  System.Data;
using  System.Configuration;
 
using  System.Web;
using  System.Web.Security;
using  System.Web.UI;
using  System.Web.UI.HtmlControls;
using  System.Web.UI.WebControls;
using  System.Web.UI.WebControls.WebParts;
 
namespace  sjn
{
    
///  
    
/// MessageBox 的摘要说明
    
///  

     public   sealed   class  MessageBox : WebControl
    {
        
private   bool  _show  =   false ;
        
private   string  _message  =   string .Empty;
        
public   void  Show( string  msg)
        {
            
this ._show  =   true ;
            
this ._message  =  ToJSString(msg);
        }


        
protected   override   void  Render(HtmlTextWriter writer)
        {
            
if  (_show)
            {
                writer.Write(
" {0} " this ._message);
            }

        }
        
        
string  ToJSString( string  msg)
        {
            
return   "   " ;

        }
    }
}

 

转载于:https://www.cnblogs.com/sujingnan/archive/2010/12/02/1894949.html

你可能感兴趣的:(简单的封装一个HTML 弹出对话框的空间)