使用ASP.NET模板生成HTML静态页面的五种方案
编程学习 2021-07-04 22:40www.dzhlxh.cn编程入门
使用ASP.NET模版生成HTML静态页面并不是难事,主要是使各个静态页面间的关联和链接如何保持完整。本文介绍了使用ASP.NET模版生成HTML静态页面的五种方案
ASP.NET模版生成HTML静态页面方案1:
/// < summary>
/// 传入URL返回网页的html代码
/// < /summary>
/// < param name="Url">URL< /param>
/// < returns>< /returns>
public static string getUrltoHtml(string Url)
{
errorMsg = "";
try
{
System.Net.WebRequest wReq = System.Net.WebRequest.Create(Url);
// Get the response instance.
System.Net.WebResponse wResp =wReq.GetResponse();
// Read an HTTP-specific property
//if (wResp.GetType() ==HttpWebResponse)
//{
//DateTime updated =((System.Net.HttpWebResponse)wResp).LastModified;
/
代码如下:
/// < summary>
/// 传入URL返回网页的html代码
/// < /summary>
/// < param name="Url">URL< /param>
/// < returns>< /returns>
public static string getUrltoHtml(string Url)
{
errorMsg = "";
try
{
System.Net.WebRequest wReq = System.Net.WebRequest.Create(Url);
// Get the response instance.
System.Net.WebResponse wResp =wReq.GetResponse();
// Read an HTTP-specific property
//if (wResp.GetType() ==HttpWebResponse)
//{
//DateTime updated =((System.Net.HttpWebResponse)wResp).LastModified;
/