Click here to Skip to main content
15,885,546 members
Articles / Web Development / ASP.NET

Using C# code inside JavaScript code

Rate me:
Please Sign up or sign in to vote.
4.57/5 (5 votes)
26 Aug 2010CPOL 31.8K   4  

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
31 Aug 2010Prosanta Kundu online
I always prefer this approach belowASPX pageIn aspx.cs page Page_LoadPage.ClientScript.RegisterClientScriptBlock(Page.GetType(), "pageVars", string.Format("var TextBox1 = '{0}';", TextBox1.ClientID),true);When required...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer Asset Technology Group
Egypt Egypt
I'm a professional components designer, web developer, UX engineer and 3d designer as well, I'm 4 years experienced .net software engineer and 7 years experienced 3d designer using 3D Max. I'm very interested in RIA technologies, prototyping and UX engineering.

Ahmed Said
Senior .Net Software Engineer

Comments and Discussions