ClientScript

 1 ClientScript if  ( ! ClientScript.IsClientScriptBlockRegistered( " clientScript " )) 
 2 ClientScript         {
 3ClientScript            String scriptString = @"<script language=JavaScript>window.showModalDialog('print_encasementinform.aspx?parentid=" + this.Hidden1.Value.Trim().ToString() + "',window,'status:Modeless;edge:raised;unadorned:no;scroll=yes;resizable:yes;center=yes;help:no;dialogWidth:100;DialogHeight:100;');</script>";
 4ClientScript            ClientScript.RegisterClientScriptBlock(this.GetType(),"clientScript", scriptString);
 5ClientScript        }

 6 ClientScript // 代替下面的
 7 ClientScript          if  ( ! this .IsClientScriptBlockRegistered( " clientScript " ))
 8 ClientScript         {
 9ClientScript            String scriptString = @"<script language=JavaScript>window.showModalDialog('print_encasementinform.aspx?parentid=" + this.Hidden1.Value.Trim().ToString() + "',window,'status:Modeless;edge:raised;unadorned:no;scroll=yes;resizable:yes;center=yes;help:no;dialogWidth:100;DialogHeight:100;');</script>";
10ClientScript            this.RegisterClientScriptBlock("clientScript", scriptString);
11ClientScript        }

你可能感兴趣的:(script)