开发者

What is wrong with ScriptManager.RegisterStartupScript?

开发者 https://www.devze.com 2022-12-20 11:43 出处:网络
ScriptManager.RegisterStartupScript(this, this.GetType(), \"redirectScript\", \"window.location.href=\'Thankyou.aspx?\'Service=\" + hidService.Value+ \";\",true);
ScriptManager.RegisterStartupScript(this, this.GetType(), "redirectScript", "window.location.href='Thankyou.aspx?'Service=" + hidService.Value  + ";",true);

Getting error: Expected ;

Plea开发者_JAVA技巧se help me


I think your quotes are a little messed up, try:

ScriptManager.RegisterStartupScript(this, this.GetType(), "redirectScript",
    "window.location.href='Thankyou.aspx?Service=" + hidService.Value + "';", true);

You had a single quote after your Service= and it should have been just before your ;.

0

精彩评论

暂无评论...
验证码 换一张
取 消