public void ClassTop() {
          StringBuilder HTMLStr = new StringBuilder();
              HTMLStr.Append("<table border=0  cellspacing=1 cellpadding=3 height=1 class=table >");
              HTMLStr.Append("<tr>");
              HTMLStr.Append("<td width=100% class=title >"+ClassTitle+"管理</td>");
              HTMLStr.Append("</tr>");
              HTMLStr.Append("<tr>");
              HTMLStr.Append("<td class= title2 >[<a href="+TableURl + "?action=&sqlStr= >" + ClassTitle + "列表</a>]&nbsp;&nbsp;[<a href= " + TableURl + "?action=Add >添加" + ClassTitle + "</a>]&nbsp;&nbsp;[<a href= " + TableURl + "?action=&sqlStr=0 >审核" + ClassTitle + "");
              HTMLStr.Append("</a>]&nbsp;&nbsp;[<a href= "+CommentUrl+" >评论管理</a>]&nbsp;&nbsp;[<a href= "+CommentUrl+"?action=&sqlStr=0 >审核评论</a>]&nbsp;&nbsp;[<a href= "+ClassUrl+"?action=Add >栏目添加</a>]&nbsp;&nbsp;[<a href= "+ClassUrl+" >栏目管理</a>]</td>");
              HTMLStr.Append("</tr>");
              HTMLStr.Append("</table>");
              Response.Write(HTMLStr.ToString()); 错误:
 编译错误 
说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。 编译器错误信息: CS0103: 当前上下文中不存在名称“Response”源错误: 行 95:               HTMLStr.Append("</table>");
行 96: 
行 97:               Response.Write(HTMLStr.ToString()); 
行 98:         }
行 99:     }
 源文件: f:\Ke_System\App_Code\MangeClass.cs    行: 97 怎么办解决
        }

解决方案 »

  1.   

    f:\Ke_System\App_Code\MangeClass.cs
    你这是在代码文件中的Response
    并没有针对某一页面
      

  2.   

    public string ClassTop() {
              StringBuilder HTMLStr = new StringBuilder();
                  HTMLStr.Append("<table border=0  cellspacing=1 cellpadding=3 height=1 class=table >");
                  HTMLStr.Append("<tr>");
                  HTMLStr.Append("<td width=100% class=title >"+ClassTitle+"管理</td>");
                  HTMLStr.Append("</tr>");
                  HTMLStr.Append("<tr>");
                  HTMLStr.Append("<td class= title2 >[<a href="+TableURl + "?action=&sqlStr= >" + ClassTitle + "列表</a>]&nbsp;&nbsp;[<a href= " + TableURl + "?action=Add >添加" + ClassTitle + "</a>]&nbsp;&nbsp;[<a href= " + TableURl + "?action=&sqlStr=0 >审核" + ClassTitle + "");
                  HTMLStr.Append("</a>]&nbsp;&nbsp;[<a href= "+CommentUrl+" >评论管理</a>]&nbsp;&nbsp;[<a href= "+CommentUrl+"?action=&sqlStr=0 >审核评论</a>]&nbsp;&nbsp;[<a href= "+ClassUrl+"?action=Add >栏目添加</a>]&nbsp;&nbsp;[<a href= "+ClassUrl+" >栏目管理</a>]</td>");
                  HTMLStr.Append("</tr>");
                  HTMLStr.Append("</table>");              return HTMLStr.ToString();
               }
    //****直接在前台<%=ClassTop()%>