Click here to Skip to main content
15,879,474 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi i have a varaible called EmployeeName, i want to pass this value to Javascript. Means i want to pass the value to Javascript Function. Thanks Ravi
Posted

Add this in code behind wher you are calling javascript.
C#
string func = "Javascriptfunction('"+EmployeeName+"');";
    ClientScript.RegisterStartupScript(this.GetType(), "success", func, true);


Refer this link if have any doubt
http://www.devcurry.com/2009/01/execute-javascript-function-from-aspnet.html
 
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