HomeLearnGeneral ASP.NET VideosHow Do I: Share Data Between Client JavaScript and Server Code Using a Hidden Field  

[How Do I:] Share Data Between Client JavaScript and Server Code Using a Hidden Field

Please install Silverlight or click download to watch video locally.

In this video Chris Pels will show how to share data in between JavaScript and server-side code by using a hidden field in an ASP.NET page. Next, learn how to use the RegisterHiddenField method in server-side code to programmatically create a hidden field on the client. In addition, see how to programmatically create a HiddenField server control for sharing data on an ASP.NET page. Finally, use the RegisterArrayDeclaration method to create a container in server code for storing multiple values that is rendered to the page where it can be accessed by JavaScript.

Presented by Chris Pels

Duration: 21 minutes, 16 seconds

Date: 13 March 2008

Watch    Video   |   Download    Video   |   VB Code    C# Code

Video downloads: WMV  |  Zune  |  iPod  |  PSP  |  MPEG-4  |  3GP

Audio downloads: AAC  |  WMA  |  MPEG-4  |  MPEG-3  |  MPEG-2

Comments : 12

Leave a Comment

Dollarjunkie : On March 27, 2008 2:00 PM said:

Great tutorial

mikemcmeekin : On March 30, 2008 5:39 PM said:

Hi, Good video but I think that using the scriptmanager at the end to inject javascript variables isn't the best way of storing that data. Instead I'd normally use the dropdown control as you can fill the control using xml/dataset while still being able to access the same data with clientside code.

I think it would be a good deal more efficient!

uwspstar : On April 11, 2008 1:05 PM said:

it is a really great javascript tutorial

cv_vikram : On August 09, 2008 8:36 AM said:

tfs....

Shrikant Tambakhe : On August 27, 2008 2:16 AM said:

Easy to understand.

djibril_chimere_DIAW : On October 29, 2008 1:49 PM said:

Thanks! Jërëjëf!

djafer : On November 12, 2008 1:09 AM said:

Çok Teşekkürler

bohunt : On February 13, 2009 3:37 PM said:

Thanks!

stopher819 : On April 03, 2009 2:06 PM said:

Correct me if I'm wrong, but I continually here people refer to "Dim" as "dimension", but I'm pretty sure it stands for "declare in memory"

muktesh : On April 21, 2009 3:37 AM said:

Awesome!

haithemara : On May 18, 2009 4:41 AM said:

Great video . Thank you Chris. However, hidden fields are not secure since page rendering show the injected code of those fields.

thank you.

Vigirtheeswaran : On June 09, 2009 10:34 AM said:

Nice tutorial. Thank you. This is exactly what i want... :)

Leave a Comment

You must be logged in to leave a comment. Click here to log in.

Microsoft Communities