Click here to Skip to main content
15,893,266 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
ClientScript.RegisterStartupScript(this.GetType(), "Upload", sescript.ToString(),false);

This lines are working will IE and Mozilefirefox, not working in chrome

can any one help me how to resolve this

What I have tried:

ClientScript.RegisterStartupScript(this.GetType(), "Upload", sescript.ToString(),false);
Posted
Updated 23-Oct-18 1:28am
Comments
F-ES Sitecore 23-Oct-18 6:31am    
RegisterStartupScript does work in Chrome, so it's something to do with other js on the page, the js you're injecting, or something else we can't help you with. Look at the console for any errors. It might be that you have "false" as the last param where you need "true".
Member 13995256 23-Oct-18 6:41am    
script is --- string sescript = "$(\"#UploadPhoto\").click(); ";

i tried with false too

1 solution

Try this:

C#
ClientScript.RegisterStartupScript(this.GetType(), "Upload", "sescript.ToString();", true);
 
Share this answer
 
v2

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