怎样在自己做的网页中返回?

来源:百度知道 编辑:UC知道 时间:2024/05/03 10:20:43
我现在自己做了一个网页,自己再建一些网页,然后超链接后进去,怎样设置一个东西再回去?

你在网页上打上一个 返回,然后把返回设置超链接,超链接为你要返回的网页即可。

也就是再建一个超链接

需要你开放IIS匿名用户对你首页的读写修改权限;或者是模拟其他具有操作首页文件权限的用户身份运行以下两个方法.
把首页文件读取出来得到字符串,就可以修改了,然后调用创建方法重新生成首页文件就可以了.
我刚给公司开发了一套新闻后台管理系统,就是自动生成新闻以及新闻列表的页面的,如果有什么不清楚的可以多多探讨!

读取文件的方法;
public string ReadHtm()
{
string HtmlPath = "你首页的文件名称";
string path = System.Web.HttpContext.Current.Request.MapPath(HtmlPath );
System.Text.Encoding code = System.Text.Encoding.GetEncoding("gb2312");
//读取文件
string temp = path + "你首页的文件名称";
System.IO.StreamReader sr = null;
string str = "";
try
{
sr = new System.IO.StreamReader(temp, code);
str = sr.ReadToEnd(); // 读取文件
}
catch (Exception exp)
{
HttpContext.Current.Response.Write(exp.Message);
HttpContext.Current.Response.End();
}
finally
{
if (sr != null)
sr.Close();
}
return str;
}