ASP.NET with C# add javscript code

asp.net javascript,
hello all I have a querry with javascript and asp.net.

i want to add javascript codes in my asp.net project where do i do that and how do i do it.

i suppose in aspx file?
and how do i add javascript code.

secondly if a variable in javascript has some value which i want to share it with asp.net how do i transfer it in asp.net variable

i am using Csharp

i have function in asp.cs file there i need this javascript value how do i take it there?
dontnetsanjayAsked:
Who is Participating?
 
nisarkhanCommented:
0
 
surajgupthaCommented:
>> secondly if a variable in javascript has some value which i want to share it with asp.net how do i transfer it in asp.net variable

use a Hidden variable with a run at server option

<input type='hidden' id ='hdnUserPassword' runat='server'>
0
 
surajgupthaCommented:
>> i want to add javascript codes in my asp.net project where do i do that and how do i do it.

http://msdn2.microsoft.com/en-us/library/Aa479011.aspx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.