Click here to Skip to main content
15,908,274 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
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 we dont pass parameter it works fine,but for one or more parameters it doesnt work
Posted

You can mention the page/control name directly for the first parameter.

check this link [^] hope this helps.
 
Share this answer
 
it works fine for me

look at this


XML
string pageurl = "ViewBlogs.aspx?blogid=" + e.CommandArgument.ToString() + "&action=view";
            
            string script = "<script language='javascript'>viewblogs('" + pageurl + "');</script>";
            ScriptManager.RegisterStartupScript(Page, typeof(string), "clientScript", script, false);
 
Share this answer
 
Comments
Abhilask kumar 5-Oct-13 7:29am    
Its Not Working.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900