Hello All,
I have to create a javascript function dynamically from a code behind in C#.NET.
How do I achieve this?
To be more clear..I have a master page which has two user controls..lets say left and right.
On a button click event on the left user control...after all the processing of the left control, i am generating some values. Now, I have to pass these values to a javascript function (which i will have to do from codebehind itself). Which means i have to develop a javacript function in code behind which will have values dynamically..different everytime. Now, I need to pass this function to the right user control to display.
What are the ways to achieve all these steps?
I am confused as to where i should put all the code?
Your guidance will help..
Thanks in advance.
http://forums.asp.net/p/1422373/3159122.aspx#5._How_do_I_add_CSS_or_JavaScript_from_the_contents_page_dynamically
http://sohelruet.wordpress.com/2008/06/14/how-to-add-javascript-at-runtime-using-c-in-aspnet-20/