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

Please install Silverlight or click download to watch video locally.

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

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    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 : 13

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.

djibril_chimere_DIAW : On November 30, 2008 9:54 AM said:

Thanks! Jërëjëf !

bohunt : On February 13, 2009 5:34 PM said:

Great video, thanks!

elmahdi : On February 26, 2009 12:10 AM said:

I copyed the code and I'm getting this message

"Name 'divmain' is not declared"... can anybody help me!.. thank you

the trust : On June 08, 2009 2:10 PM said:

thank you

but i was download this video but

i can n't why i dont know...

haithemara : On June 08, 2009 11:03 PM said:

thanks.

Leave a Comment

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

Microsoft Communities