473,396 Members | 1,756 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,396 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 19 '05 #1
2 867
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 19 '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 19 '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#),...
1
by: Earl Teigrob | last post by:
Background: When I create a ASP.NET control (User or custom), it often requires security to be set for certain functionality with the control. For example, a news release user control that is...
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...
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
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.