In Asp.net, you can use the cache method to optimize your display, or dynamically generate static data. There are many methods available.
First, we will talk about the Asp.net cache method.
Caching is a way to achieve "good enough" performance without much time and analysis.
Use cache to solve some data that is frequently accessed. This solution applies to the logic page that has been built, this allows you to think about optimizing the database structure or SQL statements.
The call is very simple. Reference System. Web. caching;
Cache _ cache = new cache (); Declaration
Refer to the msdn article.
Http://msdn2.microsoft.com/en-us/library/system.web.caching.aspx
Frequently called pages can also be cached with page-level output
Applicable to pages that are not frequently changed and are in a large number of common forms
Easy to implement
To implement the page output cache, you only need to add an outputcache command to the page.
<% @ Outputcache duration = "60" varybyparam = "*" %>
Like other page commands, this command should appear at the top of the ASPX page, that is, before any output. It supports five attributes (or parameters), two of which are required.
Refer to the msdn article:
Http://msdn.microsoft.com/library/default.asp? Url =/library/en-US/cpgenref/html/cpconoutputcache. asp
If the access is very frequent, you can also consider static forms.
Dynamically generate static forms.
If the page format changes frequently, you can use XML as the middleware to work with XSL.
Reference System. XML in Asp.net
You can use system. xml. xmldatadocument _ xml = new system. xml. xmldatadocument (_ DS );
System. xml. XSL. Pipeline transform _ XSL = new system. xml. XSL. Pipeline transform ();
_ XSL. Load (system. Web. httpcontext. Current. server. mappath ("XSL. XSLT "));
System. Io. memorystream T = new system. Io. memorystream ();
_ XSL. Transform (_ xml. documentelement, null, T, null );
If you can, you can also consider starting from the page layout and using the <div> nesting does not need to wait until the HTML of the page is loaded, so it is better to experience the customer.
You can also refer to the popular Ajax for asynchronous transmission, or share some server pressure
If you can combine FSO and XML + XSL to generate static pages in ASP
In addition, you can use the component mode in ASP to encapsulate complex logic to increase the speed.
In addition, you can use stored procedures in databases to increase the speed, regardless of ASP or Asp.net.