A Beginner's Tutorial for Understanding Templated User Controls - Online Free Computer Tutorials.

'Software Development, Games Development, Mobile Development, iOS Development, Android Development, Window Phone Development. Dot Net, Window Services,WCF Services, Web Services, MVC, MySQL, SQL Server and Oracle Tutorials, Articles and their Resources

Tuesday, June 12, 2012

A Beginner's Tutorial for Understanding Templated User Controls

Introduction

This article aims at understanding templated web user controls from a beginner's perspective. We will try to understand why we might need to have a templated user control and what the benefits of having a templated user control are.

Background

Whenever there is a scenario when we need to use a group of controls with some common functionality in multiple places, we resort ourselves to User Controls. User Controls combine a set of controls and functionality for reuse in multiple places of a site.

Now let's we think about a scenario where we might need some data to be represented on the UI. We need to represent this data on multiple pages and the layout/appearance of this data could be different on different locations. Can we use a user control in such a scenario? The answer to this question is - Yes, we can. What we need to do to facilitate such a reuse of data with the possibility/flexibility of controlling the layout is to have ourselves a templated user control.

Templated user controls encapsulate data inside and provide the facility to have a custom layout for the data for each instance of the templated user control. Sometimes it may also provide the default representation with the possibility to customize the representation. Let us try to work out an example to understand and implement the same.


Read More...


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too. 

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


No comments:

Post a Comment