更正代码的语法 [英] correct the syntax of code

查看:83
本文介绍了更正代码的语法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

string v1 = "nitin";
        string javaScript = "window.open('Default2.aspx?p1='" + v1 +",'','width=400, height=400, left=300, top=400');";
        ScriptManager.RegisterStartupScript(this, this.GetType(), "hi", javaScript.ToString(), true);





如果我没有传递参数,则可以正常工作,但不能与参数一起使用





if i m not passing the parameter it work fine but it doesn''t work with parameter

推荐答案

尝试以下操作:-
try this:-
string v1 = "nitin";
        string javaScript = "window.open(''Default2.aspx?p1=" & v1 & "'',''newwindow'',''width=400, height=400, left=300, top=400'');return false;";
        ScriptManager.RegisterStartupScript(this, this.GetType(), "hi", javaScript, true);


您好
试试这个
Hi
try this
string v1 = "nitin";
           string jscript = "window.open('Default2.aspx?p1=" + v1 + "','','width=400, height=400, left=300, top=400');";
           ScriptManager.RegisterStartupScript(this, this.GetType(), "hi", jscript.ToString(), true);


这篇关于更正代码的语法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆