Dynamic creation of web pages without .aspx files

M

michelle

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top