By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,920 Members | 1,660 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,920 IT Pros & Developers. It's quick & easy.

Dynamic creation of web pages without .aspx files

P: n/a
I am experimenting with dynamically creating pages containing custom
controls in response to http requests caught by an http handler, in
place of writing and requesting aspx files. Specifically, I am doing
the following:
- mapping requests to an http handler
- instantiating a class hierarchy that, retrieves data, parses the URL
and performs some business processing
- instantiating the Page class and adding controls
- rendering the page object to an HtmlTextWriter object
- Response.Write the contents of the HtmlTextWriter back to the
browser

At no point am I using or creating an .aspx file.

The reason why I am investigating doing things this way is that we are
trying to build a very flexible, customisable user interface on top of
a multi-layered data-driven system.

I am successfully rendering controls in this way. However, even though
the web controls explicitly set
EnableViewState = true;
the _VIEWSTATE hidden field is not being rendered to the browser.

The questions I have are:
How can I ensure that the the viewstate field is rendered along with
the control? and,
Is what I am attempting to do possible?

Thanks in advance
Nov 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.