Tuesday, March 13, 2012

Stuck on XML/XSLT with Asp.net 1.1 server controls.

Hello everyone,

I am working on a custom built portal system in Visual Studio 2003 and I amstuck on how to develop with XML/XSLT and using Asp.net server controls. Theportal consists of "applications" (each application is essentially a.aspx page) and those applications consists of "modules" (whichderives from UserControl). Now in order to maintain a consistent look for allmodules/applications and to minimize the amount of actual html hard coded, Iwant to use XSLT (which would contain the html) and CSS to help generate thatconsistent appearance. TheModule class containstitle andbodyfields, wherebodycan have any form of content (html/text/javascript),but sinceModulederives from UserControl, it can also contain .Net childcontrols, and I need those child controls to render correctly to take fulladvantage of Asp.Net. What would be the best approach to accomplish this inwhich the module would be transformed using a XSL file?


This also needs to apply to an application as well (or atleast the layout of the application, something that controls the placement ofthe modules). If I have a collection of modules, I need to put them in someform of structure or layout and transform that layout through an XSL file tohave a consistent look and only one place to look when we need to change thelook of a module or application. What would be the best approach for this orcould you point me in the right direction? If you need any furtherclarification, I would be more than willing to help. Thanks in advance!

Steve

Wow that was a lot...

Was there a specific bit of coding that you are stuck on or are you looking for a broadranged theory?


If you'd like I can tell you what I have right now, but I'mthinking it may be better to take a step back and look at it from a differentangle.Smile [:)] The first question is best approach to take a user control that contains child controls and other content, run it through an .xsl file, and have it display properly on the page. Thanks for your help!


User controls containing child controls is nothing special... in fact really just about every User Control ever made has child controls. User Controls, with User Controls would be nothing different really either...

Let me see if I have it right, before I comment...

You want your XML to contain the list of what's on each control, and the XSL to contain the "way" that the controls display? Is that correct?

And you are wondering if this is a good approach?

0 comments:

Post a Comment