Page view counter
HomeLearnVideosHow Do I: Make HTML elements accessible from server side code  

How Do I: Make HTML elements accessible from server side code

In this video Chris Pels will show how to make standard HTML elements in an .aspx page accessible from server side code so they can be used in page processing like a standard ASP.NET server control. First, see how the addition of a runat=”server” attribute to a standard HTML control like a <div> allows it to be referenced in server side code with full Intellisense. Next, see several examples of how you might manipulate HTML elements on a page with this technique. Lastly, see how this technique can be used in conjunction with the new ListView control in .NET Framework Version 3.5 to control the layout of a list.

Presented by Chris Pels

Duration: 21 minutes, 59 seconds

Date: 29 May 2008

Watch the video   |   Download the video   |   Get VB code  or  C# code

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

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

Comments : 8

Leave a Comment

apt : On May 30, 2008 12:44 PM said:

This video does not pay attention that every generic HTML ASP.NET server control does have an "enableviewstate" property   which default value is "true" and the entire content of a control goes into page's view state. Since generic HTML controls usually are used for rendering layout and some text content it makes sense to turn the control's view state off especially when such a control is used inside data bound controls like ListView that render significant amount of HTML output.

mimranm29 : On June 20, 2008 9:47 AM said:

Thank You Chris,

Imran

atarikg : On June 22, 2008 10:07 AM said:

It seems pretty nice tutorial. I am to download it right now. Thanks Chris Pels ...

PVamsiK : On July 18, 2008 3:39 PM said:

Good tutorial.

FoothillsData : On July 29, 2008 12:46 PM said:

Good explanation of how to control HTML from your VB code behind module...

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

thanks....

asater : On August 20, 2008 10:07 AM said:

Thank you

djafer : On November 12, 2008 6:53 AM said:

Thank you, nice video.

Leave a Comment

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

Microsoft Communities