What's wrong with this ??

  • Thread starter Thread starter JezB
  • Start date Start date
J

JezB

What's wrong with this c# code ?

Response.Write("<script language=\"javascript\">");
Response.Write("window.open('WebForm1.aspx','TEST PAGE','width=400');");
Response.Write("</script>");

I keep getting "Invalid Argument" errors (when I expand on the warning icon
created by the above on the bottom left of IE). The target aspx file does
exist.
 
OK I found out that you cant have spaces in the second argument - I thought
this was window title.
 
Remove the 2nd argument in the window.open() function. Space is not allowed. Make it either "TEST_PAGE" or "TESTPAGE" .
 
You're a month late, but thanks !

Bharat Biyani said:
Remove the 2nd argument in the window.open() function. Space is not
allowed. Make it either "TEST_PAGE" or "TESTPAGE" .
 
Back
Top