1. Use Serever. Excute
Copy CodeThe code is as follows:
StreamWriter sw = New StreamWriter (Server.MapPath ("html/login.html"), false);
Server.Execute ("showcolumn.aspx?id=1&page=2", SW);
Sw. Close ();
2. Create a simple Entity URL class
The 3.urls class gets all the URLs in the Urls.config file
4.httpmodule class processing the address of the request
5. Add in Web.config HttpModule node
asp.net two ways to generate static pages
Default.aspx page:
Copy CodeThe code is as follows:
<%@ Page language= "C #" autoeventwireup= "true" codebehind= "Default.aspx.cs" inherits= "Webapplication6._default"% >
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
Two examples of <title>asp.net generating static pages </title>
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service