How to open another form in codebehind using javascript
I have following code in button click Response.Write("window.open('Contact.aspx')");
The above code is working.but if use
String s = "Contact.aspx";
R开发者_StackOverflowesponse.Write("<script type=text/javascript>window.open('"+s+"')</script>");
The above code shows error as 'Too many literals'.Can anybody help to remove this error.
I believe you're missing the enclosing quotes around "text/javascript".
It should be:
String s = "Contact.aspx";
Response.Write("<script type='text/javascript'>window.open('"+s+"')</script>");
精彩评论