473,378 Members | 1,607 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,378 software developers and data experts.

model for dymanically built web pages...

In short, I'm looking for a way to take in an XML file, which tells me the
controls on a page, then generate this page for the client who requested it.
I'm using ASP.Net 2.0 beta 2, or 1.1 (c#), which ever is more appropriate...

Is there an existing model for doing this?

I was thinking, that a user would click on a link, something like
"MyPage.aspx?xml=TimeReport.xml", whcih would then use the query string to
get the xml file to build the page from. A StringBuilder object with the
relevant HTML declarations and inline C# scripting, would then be generated
from the XML that was parsed, and then using Response.Write to dump this
back up to the client.
The one problem with this is I'm not sure how to hook up events. A button
press would be used to refresh the page, and rebind a grid control, for
example.

Any thoughts on this would be appreciated.

Thanks.

Dan.
Nov 17 '05 #1
2 1038
Your idea isn't ideal, and there are samples out there. I'd look at the
Community Starter Kit
http://asp.net/StarterKits/DownloadC...ndex=0&tabid=1

I think you'll be very pleased at how it'll help you.

For a quick tip, you don't want to have a huge html string that you just
response.write (yuck!). You want to dymamically load user controls.

A very simple example:
<page id="blah">
<control target="leftNav">login.ascx</control>
<control target="main">news.ascx</control>
</page>

Page pseudo-code:
Get controls for page "blah"
loop through controls
FindControl(target)
if target is not nothing then
LoadControl(control)
Target add control (control)
end if
next control
Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Dan Bass" <Not Listed> wrote in message
news:OQ****************@TK2MSFTNGP12.phx.gbl...
In short, I'm looking for a way to take in an XML file, which tells me the
controls on a page, then generate this page for the client who requested
it. I'm using ASP.Net 2.0 beta 2, or 1.1 (c#), which ever is more
appropriate...

Is there an existing model for doing this?

I was thinking, that a user would click on a link, something like
"MyPage.aspx?xml=TimeReport.xml", whcih would then use the query string to
get the xml file to build the page from. A StringBuilder object with the
relevant HTML declarations and inline C# scripting, would then be
generated from the XML that was parsed, and then using Response.Write to
dump this back up to the client.
The one problem with this is I'm not sure how to hook up events. A button
press would be used to refresh the page, and rebind a grid control, for
example.

Any thoughts on this would be appreciated.

Thanks.

Dan.

Nov 17 '05 #2

Thanks for the reply and example, I'll follow up on that link.

For a quick tip, you don't want to have a huge html string that you just
response.write (yuck!).


I agree, it wasn't a very nice means of doing it!
Nov 17 '05 #3

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

Similar topics

13
by: Droolboy | last post by:
I'm trying to build a fairly small (max. 10 different pages) site using php, and it's becoming obvious that I need some kind of model view separation. Having done a few searches, I've come...
13
by: Stephen Poley | last post by:
Good advice is frequently given in c.i.w.a.* on page structure: matters such as separation of content from presentation, graceful degradation, non-dependence on Flash etc. For some while I've...
19
by: Steve Jorgensen | last post by:
I've run across this issue several times of late, and I've never come up with a satisfactory answer to the best way to handle this schema issue. You have a large section of schema in which a...
2
by: Dan Bass | last post by:
In short, I'm looking for a way to take in an XML file, which tells me the controls on a page, then generate this page for the client who requested it. I'm using ASP.Net 2.0 beta 2, or 1.1 (c#),...
9
by: clintonG | last post by:
Simply a postulation but consider the following... // breaks when declared in content page that uses a MasterPage <img src="App_Themes/SmokeAndGlass/Images/smoke_METRO184x26.gif" /> // must...
12
by: Mike Gaab | last post by:
Hi, A newcomer to .Net (I've held out as long as I can.). I am using VS.Net 2003. I am writing some web apps and I am confronted with the usual issues that one faces when coming from a Windows,...
122
by: Edward Diener No Spam | last post by:
The definition of a component model I use below is a class which allows properties, methods, and events in a structured way which can be recognized, usually through some form of introspection...
8
by: Spam Catcher | last post by:
Hi all, From what I read, VS.NET 2005 doesn't precompile web applications into a DLL for deployment, rather you need to manually precompile before release. However, I have a web application in...
9
by: markla | last post by:
Hi, I have an EDM model, which I'm rendering using DynamicData pages. I need to add a derived/calculated field. For example, in a "Person" entity, I have LastName and FirstName. I need to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.