We help IT Professionals succeed at work.
Get Started

Javascript function from code behind. of C#.NET

swaroop_d
swaroop_d asked
on
1,048 Views
Last Modified: 2012-05-07
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.
Comment
Watch Question
Commented:
This problem has been solved!
Unlock 4 Answers and 21 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE