. Replace ("Showarticle", StrText); Showarticle in the template pagestr = str. Replace ("Biaoti", StrText);str = str. Replace ("Content", strcontent);str = str. Replace ("Author", Strauthor);Write a fileTry{SW = new StreamWriter (path + Htmlfilename, false, code);Sw. Write (str);Sw. Flush ();}catch (Exception ex){HttpContext.Current.Response.Write (ex. message);HttpContext.Current.Response.End ();}Finally{Sw. Close ();}return true;
This function is placed in the Conn.CS base class.
Reference not
Problem:
Not long ago, when I was working on a project, I found that the ASPX page called in the modal window is always automatically cached.
CodeThe setting of
The Code indicates that the client cache time is set to 1 second (must be a positive integer). If you have other good methods, please let us know. Thank you!
First of all, it's not good to use this. It is best to use ashx, but it is also inevitable to meet this demand. Developed such a system, the daily traffic up to 100,web server pressure is very small, completely large horse cart, the main pressure on the database server, to do a lot of statistics. So the page is done directly on the server control. When using Ajax, I was too lazy to write a ashx, and I wrote it directly in
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.