Creating Dynamic ASP.NET Server Controls Using XML
|
Creating Dynamic ASP.NET Server Controls Using XML by Erick ThompsonDescriptionOne of the advantages of the XML/XSLT combination is the ability to separate content from presentation. A data source can return an XML document; then by using an XSLT, the data can be transformed into whatever HTML is needed, based on the data in the XML document. The release of ASP.NET changes this picture somewhat.
ASP.NET provides server controls that have advanced functionality, such as state management, input validation, and data binding. In order to use this functionality, you need to create the controls on the server in a design time phase or at runtime from code.
The place of XML/XSLT technology in the ASP.NET model is not obvious, as the server controls generate their own HTML. The flexibility of XML/XLST can be combined with the power of ASP.NET server controls by using an XSLT to generate the server controls dynamically, thus leveraging the best of both worlds. This synergy is demonstrated by creating a survey application, in which the UI of the survey is based on an XML document defining the survey questions.
|
Become a fan of Book Presence on Facebook for the inside scoop on latest and most exclusive books.