asp.net control adapter

 

after viewing the video.and browse some msdn. the most obvious example is when you are using mobile browser .it is probably in the context of providing alternate renderings of controls for mobile devices 

Adapter is used to intercept the default rendering behaviour for an asp.net server control.mostly not required but for some cases . for customized rendering with different browser.

 

there are 4 types actually, but i haven't explore yet.

you can a class that inherit webcontroladapter

usually overrides 3 method, begin render tag, end render tag, and render contents.

you can customize a server control default rendering way.

 

after that you add the new item -> browser file.

and bind which adapter for which server control and for which browser

 

ex:

<browsers>

//default means for every browser

<browser refID="Default">

 <controlAdapters>

<adapter controlType="namaspace.namacontrol" adapterType="namaclassadapterkamu:"/>

 

 

 

Share this post: | | | |
Published Thursday, July 31, 2008 1:23 PM by cipto
Filed under:

Comments

No Comments

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Enter the numbers above: