1if (!ClientScript.IsClientScriptBlockRegistered("clientScript"))
2 {
3 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>";
4 ClientScript.RegisterClientScriptBlock(this.GetType(),"clientScript", scriptString);
5 }
6//代替下面的
7 if (!this.IsClientScriptBlockRegistered("clientScript"))
8 {
9 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>";
10 this.RegisterClientScriptBlock("clientScript", scriptString);
11 }
2 {
3 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>";
4 ClientScript.RegisterClientScriptBlock(this.GetType(),"clientScript", scriptString);
5 }
6//代替下面的
7 if (!this.IsClientScriptBlockRegistered("clientScript"))
8 {
9 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>";
10 this.RegisterClientScriptBlock("clientScript", scriptString);
11 }