p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 1.x and 2.0 Application Design (http://p2p.wrox.com/forumdisplay.php?f=67)
-   -   Dynamic website to Static website (http://p2p.wrox.com/showthread.php?t=50819)

Aboal3ood November 27th, 2006 01:50 PM

Dynamic website to Static website
Dear all,
thanks for this great forum,

I have a website build on asp.net , i need to genrate a html pages that be replaced when update on the aspx files, but when viewing the pages the iis send the html page insetad of running the aspx code behinde.

Thanks again.


virendar23 December 4th, 2006 11:54 AM

Not only IIS , Every webserver sends only HTML to the client. Thats what the browser can understand.

woodyz December 4th, 2006 12:44 PM

You seem to be asking about caching. Is this correct? Or is it that you have html pages (that is, pages with the html extension) that are updated occasionally by some admin aspx files? Please clarify.

Woody Z http://www.learntoprogramnow.com

Aboal3ood December 7th, 2006 05:40 AM

Thanks woodzy,virendar23

i am asking about pages with the html extension that are updated occasionally by some admin aspx files.


woodyz December 7th, 2006 11:46 AM

An HTML page is not dynamically processed by ASP.NET when it is requested. If the browser is requesting an HTML page, it is always going to get the HTML as written.

For example, if you have an html page named Info.html, and a browser requests Info.html, the server will return the html that is contained in that page.

However, if you have an aspx page named Info.aspx, then when the browser requests Info.aspx, the server will run the code in Info.aspx along with its code behind page code if it exists, and returns the html that is dynamically generated.

If you only want the aspx code to run occasionally, there are ways to cache the output so that it is only regenerated when the conditions exists that warrant it.

Woody Z

All times are GMT -4. The time now is 12:37 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.