|
-
Mar 26th, 2004, 06:25 AM
#1
Thread Starter
Retired VBF Adm1nistrator
Store data in web.config or keep using Response.WriteFile() ?
I was wondering if its okay to store lots of data in the web.config page ?
I have a load of .html template pages. Basically, I send the a html page (e.g. the header), then do some asp.net processing, then send some more html, and then maybe a footer (again, a different .html file).
Should I store the contents in web.config because I believe that the contents of that file are cached?
Or does data being sent by Response.WriteFile() get cached too?
i.e. I send x.html and the system reads it into memory to send it.
The next time I want to send x.html, is it re-read from the drive, or has it been cached?
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Mar 28th, 2004, 06:07 PM
#2
I might've got the wrong end of the stick here, but...
If you want to use, say a header banner throughout all the pages in your site, having the code for the banner stored in one place which is cached, you can use an include file.
ie. you can place this code:
<Table id="tblTestBanner" width="500px" bgcolor="red">
<TR><TD> </TD></TR>
</Table>
in a file called MyBanner.txt in your web application's folder, then on each of your pages, you can call on the file like this to import it's text:
<HTML>
<HEAD></HEAD>
<BODY>
<!-- #include File="MyBanner.txt" -->
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|