Is it possible to output only the generated HTML of an asp.net page?
e.g: I have asp labels and other controls which I work with on the server side. When output to the client, it always includes form tags with all the default hidden viewstate and other fields... I don't want any of those fields or any of the auto generated JavaScript in the output.
I know I can use response.clear and response.write to output exactly what I want, but my problem is that I want asp.net to generate the HTML for me. Is it possible to get the generated HTML for a page before it gets to the client?
I don't need any viewstate enabled.
So that you know, the reason I am doing this is because I am integrating Asynchronous JavaScript and XML (AJAX) into my website. I will have a template with the serverside forms and hidden fields etc, and content will be dynamically loaded into this template... So the client will only load the template, and then according to user input, content will be loaded into the template without posting back by using AJAX. If I do this, I cant have JavaScript and form tags in the content to be dynamically loaded into the template...
I hope I am being clear..? Any suggestions?
e.g: I have asp labels and other controls which I work with on the server side. When output to the client, it always includes form tags with all the default hidden viewstate and other fields... I don't want any of those fields or any of the auto generated JavaScript in the output.
I know I can use response.clear and response.write to output exactly what I want, but my problem is that I want asp.net to generate the HTML for me. Is it possible to get the generated HTML for a page before it gets to the client?
I don't need any viewstate enabled.
So that you know, the reason I am doing this is because I am integrating Asynchronous JavaScript and XML (AJAX) into my website. I will have a template with the serverside forms and hidden fields etc, and content will be dynamically loaded into this template... So the client will only load the template, and then according to user input, content will be loaded into the template without posting back by using AJAX. If I do this, I cant have JavaScript and form tags in the content to be dynamically loaded into the template...
I hope I am being clear..? Any suggestions?