public string OpenModalDialog( Page refPage, int DialogHeight, int DialogWidth, string PageUrl, string PageName )
{
string vReturnValue = "";
StringBuilder OpenModalDialogScript = new StringBuilder();
OpenModalDialogScript.Append( "<script language=javascript>\n" );
OpenModalDialogScript.Append( "vReturnValue=window.showModalDialog('"+PageUrl+"','_blank','"+PageName+"','dialogHeight: "+DialogHeight+"px; dialogWidth: "+DialogWidth+"px; dialogTop: 150px; dialogLeft: 150px; edge: Raised; center: Yes; help: Yes; resizable: Yes; status: Yes;');" + "\n");
OpenModalDialogScript.Append( "</script>" );
refPage.RegisterStartupScript( "MsgBox", OpenModalDialogScript.ToString() );
return vReturnValue;
}
{
string vReturnValue = "";
StringBuilder OpenModalDialogScript = new StringBuilder();
OpenModalDialogScript.Append( "<script language=javascript>\n" );
OpenModalDialogScript.Append( "vReturnValue=window.showModalDialog('"+PageUrl+"','_blank','"+PageName+"','dialogHeight: "+DialogHeight+"px; dialogWidth: "+DialogWidth+"px; dialogTop: 150px; dialogLeft: 150px; edge: Raised; center: Yes; help: Yes; resizable: Yes; status: Yes;');" + "\n");
OpenModalDialogScript.Append( "</script>" );
refPage.RegisterStartupScript( "MsgBox", OpenModalDialogScript.ToString() );
return vReturnValue;
}
解决方案 »
- 帮忙给通俗的讲解下“.NET框架 应用程序域”的概念
- 关于Repeater空间的使用
- 查询分析器执行select 16777216*222竟然溢出,各位,你们在执行时会遇到这种情况么?
- SqlServer2005为什么中文显示乱码?
- 真奇怪,怎么弹出登陆对话框输入正确的windows用户名和密码连续三次然后说无权查看页面?
- 关于点击按钮发送内容到邮件的问题
- 如何实现datagrid按钮对datagrid中的内容进行编辑~在线等!急!
- 刚学的MVC3。想问个VIEW的问题
- Page.RegisterStartupScript 如何用
- SQL数据库的连接
- 各位帮帮忙!你行的
- c#中怎样判断是否是数字型?
<input type="button" name="Submit" onclick="window.showModalDialog'login.asp','','width=270,height=150,top=200,left=300');window.close();,'','dialogWidth:0px;dialogHeight:0px');" value="Submit">
</form>
试试,你原来的写法很奇怪呀,showmodaldialog里又用window.open,不知是何意