Hi Erick,
I like that idea, but what limitations are there?

The first I see is that you cannot work with it in the IDE like any
other server control. What others are there? (out of interest :)
I'm checking out your article, but the PDF download failed - but the
payment was successful, so I'm waiting on it now from Wrox :S

Steven.

-----Original Message-----
From: Moderated discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED]] On Behalf Of Erick Thompson
Sent: 17 September 2002 18:07
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET] Controls, .Net and Xslt insanity


Steven,

There is no reason you can't combine the two. If you use xml/xslt to
dynamically generate asp.net source code, you can then instantiate the
controls represented in the source code, thus getting both the web
controls functionality, and the separation of data and presentation.

I recently wrote an article on doing exactly this for ASPToday.com (see
Creating Dynamic ASP.NET Server Controls Using XML). The main concern is
that the dynamic compilation does reduce your ability to scale up, but
if you're not under a heavy load, I haven't noticed much difference.

http://www.asptoday.com/content.asp?id=1882

Erick

----- Original Message -----
From: "Steven Livingstone" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 17, 2002 9:02 AM
Subject: [ADVANCED-DOTNET] Controls, .Net and Xslt insanity


> Ok, even after taking time out again to think about this issue I feel
> I need some view and opinions. Creating web controls in .Net - when
> and how?
>
> For years now I have almost without exception used Xslt to generate
> the output for forms and content alike. Now, with web controls there
> is the mixed content and code, some of which I don't like all that
> much. To generate a menu for example, I would be more tempted to write

> the code to use Xslt to transform the data. The idea of writing out
> table elements in C# code with javascript inserted as strings is not
> at all appealing.
>
> When it comes to forms, it is more appealing as you can get state
> management and validation - both of which are a pain to manage in
> Xslt. Still you have the annoying need to write out table elements and

> form elements (e.g.  output.Write("<td class='clsMenuBarCell'
> nowrap>");)
>
> I have hit one of those mind block days where I am arguing with myself

> over the better way to do things, so it's out to the jury to let me
> know what you have been doing. I'm pretty sure the best way is some
> combination - this would ideally be a way of still getting state
> management and validation, with OO, but being able to separate the
> display from the Asp.Net, but this doesn't seem possible.
>
> I also dislike the idea of transforming to an aspx page and then
> loading that.
>
> Has anyone looked at in memory dynamic compilation? In other words,
> still having your xslt's that can be loaded. These transform to an
> aspx output in memory that is dynamically returned so that you can
> still get all the benefits of state management and validation methods?

> An example may be:
>
> - user vists page
> - aspx page generates form using Xml data and Xslt to create aspx code
> - user submits data
> - aspx code behind validates and maintains viewstate
> - in memory aspx output section is modified by code-behind (e.g.
> label.Text="Invalid Telephone Number")
> - result is sent to the output
>
> Thanks,
> Steven.
>
>
> ==========================================================
> Steven Livingstone BSc (hons), PgDip ITS
> [[EMAIL PROTECTED]] .Net & Xml Consultant
>
> Change your business at http://www.deltabis.net
> Grow your business at http://www.venturetogether.com
> Change European Football at http://www.theatlanticleague.com
>
> *** Author of "Application Development with MSXML 4.0"
> *** Coming Soon to a developer near you...
> "Beg VB.NET XML:Essential XML Skills for VB.NET Programmers" "Beg C#
> XML:Essential XML Skills for C# Programmers"
> ==========================================================
>
> You can read messages from the Advanced DOTNET archive, unsubscribe
> from
Advanced DOTNET, or
> subscribe to other DevelopMentor lists at http://discuss.develop.com.
>

You can read messages from the Advanced DOTNET archive, unsubscribe from
Advanced DOTNET, or subscribe to other DevelopMentor lists at
http://discuss.develop.com.

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to