谁可以教教?? 我例子或视频最好咯
 发邮箱  [email protected]

解决方案 »

  1.   

    使用模板页,替换数据或用urlrewriter重写url.http://topic.csdn.net/u/20080527/23/2de13ee1-0b66-478e-abb7-6f9e1aaf1619.html
      

  2.   

    public static bool WriteFile(string strText,string strContent,string strAuthor)
       {
       string path = HttpContext.Current.Server.MapPath("/news/");
        Encoding code = Encoding.GetEncoding("gb2312");
       string temp = HttpContext.Current.Server.MapPath("/news/a.html");
        StreamReader sr=null;
        StreamWriter sw=null;
       string str=""; 
       try
        {
         sr = new StreamReader(temp, code);
         str = sr.ReadToEnd(); 
        }
       catch(Exception exp)
        {
         HttpContext.Current.Response.Write(exp.Message);
         HttpContext.Current.Response.End();
         sr.Close();
        }
       string htmlfilename=DateTime.Now.ToString("yyyyMMddHHmmss")+".html";
        str =str.Replace("",strText); 
        str = str.Replace("",strText);
        str = str.Replace("",strContent);
        str = str.Replace("",strAuthor);
       try
        {
         sw = new StreamWriter(path + htmlfilename , false, code);
         sw.Write(str);
         sw.Flush();
        }
       catch(Exception ex)
        {
         HttpContext.Current.Response.Write(ex.Message);
         HttpContext.Current.Response.End();
        }
       finally
        {
         sw.Close();
        }
      

  3.   

    浏览器不是就只能认识静态的html吗?所谓的动态是指的服务器动态生成?
      

  4.   

    个人觉得自己好好想想生成HTML的流程到底该如何走,即使写不程序来,至少也懂得了其中的原理,比在这里索求资料要好。
    其实HTML的生成并没有想象中困难,问题是,我上面提到的这个“流程”你是否可以掌握。