最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
ASP.NET调用HTML网站模版实例
时间:2022-06-25 03:46:22 编辑:袖梨 来源:一聚教程网
下面我就来给大家讲解下具体的方法吧。主要方法:
代码如下 | 复制代码 |
public string GetInterIDList(string strfile) { string strout; strout = ""; if (!File.Exists(System.Web.HttpContext.Current.Server.MapPath(strfile))) { } else { StreamReader sr = new StreamReader(System.Web.HttpContext.Current.Server.MapPath(strfile), System.Text.Encoding.Default); String input = sr.ReadToEnd(); sr.Close(); strout = input; } return strout; } |
上面的方法主要是用于读取模版,然后加载。
下面调用的方法直接使用:
GetInterIDList("Template/index.html"); //这方法主要是掉用模版,里面主要是模版的路径。
在以后的程序里模版一定会日益增多,因为模版有很多好处。
相关文章
- 猫咪斗恶龙2修改器在哪下载 05-05
- 兽人必须死3修改器在哪下载 05-05
- 最后生还者重制版PC版几点能玩 05-05
- 今日小鸡庄园答案2024.5.6 05-05
- 蚂蚁庄园今日答案最新2024.5.6 05-05
- 小鸡庄园今天答案2024.5.6 05-05