Home | Visual Studio and BSOD's | ASP.NET 2.0 at NED.net | RSS as DataSource in ASP.NET 2.0 | Anthem.NET :: Another AJAX Library | Visual Studio 2005 Addons | Hotmail Live Beta | Fuel Cell Vehicle :: The cleanest car on the planet | Atlas Demo on MSDN TV | More comments on IT sector :: Adnan Farooq Hashmi | More comments on IT sector :: Hammad Rajjoub
Saturday, May 06, 2006
Control Adapters in ASP.NET 2.0

How many of you are willing to alter the layout of current server controls in ASP.NET 2.0? I am sure many of you are interested in playing with the layout and change the way it looks and reacts by default. One way to achieve your goal is to either use CSS style sheets or newly introduced Themes in ASP.NET 2.0. But at the end of the day, what you are doing is to alter the presentation of your server controls or html tags. There is no possibility of changing the way your server controls react and render at client side, because it always ends up in producing html markups for server controls. Server Controls are always rigid and is not able to adapt changes. It is a bit difficult to grasp the idea at first place, so let me add more details and references to support this concept.

Control Adapters in ASP.NET 2.0 is a fairly fresh concept for web developers to hold. In the background what it does is it allows you to do pretty much with the way your web application or, in other words server controls react to the browsers. You can create your one web application to run on web browsers of all types, even on mobile devices but just adding a ".browser" file to your web app. You can differentiate where the browser that send the request is of either a browser that runs on a desktop machine or is a mobile device browser. And can produce different layouts for different browsers with some additional lines of codes.

So what's the big deal, you may be thinking? Think about producing XAML through your current web application and play with the UI to run on top of WPF (Avalon). Think about creating your controls to render at client side, so to be more user friendly. Like you can do with javascripts for client side execution. You can do pretty much with custom controls and third party tools available these days. But think about having the same feature for your existing <asp:textbox> control or anyother.

Amazed aren't you. I am having a felling that I may not be as clear in explaining the feature so I would like to recommend a few resources for you to dig in and explore this feature at your own pace.

There's an amazing demo by Plip's on creating XAML from your existing web apps. Have a look at it here.

ASP.NET team member Scotts talks about the new CSS Control Adaptor toolkit for ASP.NET 2.0. Click here if you are willing to know more.


posted by Zeeshan Muhammad @ 4:33 PM |