473,402 Members | 2,072 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

generating ASPX with XSL

Hi,

In my aspx web application, I am generating a list of items in a menu down
the left-hand side. Different items in the list may have different controls
in, and this is data-driven at runtime.

At the moment I am using a custom template control similar to a repeater but
with many different templates. However, It's a bit of a pain to work with
and maintain. What I would like to do is generate the list of menu items
using XSLT

Of course I could generate the page output with XSLT but then I would only
be able to generate pure HTML in it, not asp.net controls, so I wouldn't be
able to use postbacks.

What I'd really like is to have an XSLT equivilent of data binding whereby
the datadinder is replaced by an XSLT processor which generates a tree of
aspx controls which then get put into the page. then I can still manipulate
them programmatically.

I guess there is probably some solution which involves me writing an aspx
page as text and then compiling it to make a class, but I definitely can't
afford to have the overhead of compiling each time the page is loaded.

Anyone else thought of this or come up with a good solution to this problem?

TIA

Andy


Nov 19 '05 #1
1 1387
You can custom code this using the .NET classes ("decompiled" with Reflector
or similar) or you can use Reflection.Emit() if you want to compile a
"control" on the fly. I would aim for the server class (compiled as a
library) personally, as it is more reusable and will perf better with lots of
choices than JITting on a page by page basis (assuming you cannot cache the
control, that is).

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
"Andy Fish" wrote:
Hi,

In my aspx web application, I am generating a list of items in a menu down
the left-hand side. Different items in the list may have different controls
in, and this is data-driven at runtime.

At the moment I am using a custom template control similar to a repeater but
with many different templates. However, It's a bit of a pain to work with
and maintain. What I would like to do is generate the list of menu items
using XSLT

Of course I could generate the page output with XSLT but then I would only
be able to generate pure HTML in it, not asp.net controls, so I wouldn't be
able to use postbacks.

What I'd really like is to have an XSLT equivilent of data binding whereby
the datadinder is replaced by an XSLT processor which generates a tree of
aspx controls which then get put into the page. then I can still manipulate
them programmatically.

I guess there is probably some solution which involves me writing an aspx
page as text and then compiling it to make a class, but I definitely can't
afford to have the overhead of compiling each time the page is loaded.

Anyone else thought of this or come up with a good solution to this problem?

TIA

Andy


Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jane | last post by:
Hi I have an .aspx page thats part of a site, its usually called by a user in a browser with an ID in the querystring from where it does lots of exciting things and database reads to produce the...
5
by: WL | last post by:
Hi, I'm trying to build an .ASPX file that returns the contents of a .js file, so that I can use: <script language="JavaScript" src="/mypage.aspx" type="text/javascript"></script> Even...
8
by: Lars Netzel | last post by:
Hey! I wrote a message yersterday and got some good answers and have now managed to generate a nice image. The problem is that it's all generated in an Images.Aspx file and I don't really want...
2
by: cnickl | last post by:
I’m using the usual VisualStudio setup. That is to have a “Code Behind” (somename.aspx.vb) file with all the code and the actual HTML code somename.aspx) separate. I like this setup, but now...
1
by: Chenna Sudarsan | last post by:
Hello all, I have a typical problem in deploying my ASP .NET application (code behind is VB .NET). I am generating a power point presentation (ppt file) in my application. Program is...
4
by: Lee Chapman | last post by:
Hi, I am having difficulty getting the ASP.NET framework to generate valid XHTML. My immediate problem surrounds user input in, for example, textbox controls. I consider characters such as...
7
by: Nathan Sokalski | last post by:
I am an ASP.NET developer, and Visual Studio 2005 seems to have stopped declaring the controls that I add in the *.designer.vb files, therefore forcing me to manually add them before I can use them...
1
by: Nathan Sokalski | last post by:
Visual Studio 2005 recently stopped generating the *.designer.vb files for my *.aspx and *.ascx files. I am using Service Pack 1, and do not believe I did anything differently than normal prior to...
1
by: Nathan Sokalski | last post by:
Visual Studio 2005 unexpectedly stopped generating the *.designer.vb files for *.aspx and *.ascx files. After a few days of frustration trying to fix this, I noticed that it had the following...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.