使用ASP.NET模板生成HTML静态页面的五种方案

网络编程 2021-07-04 22:40www.168986.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;
/

Copyright © 2016-2025 www.168986.cn 狼蚁网络 版权所有 Power by