记得 在后台的asp.cs 的变量red 要是 protected 或者public
<% Response.Write(" <script  language='javascript'>this.bgColor="+"red"+"); </script>" %>

解决方案 »

  1.   

    谢谢!!可是仍然提示
    Source line: Response.Write(" " 
    Description: 缺少 ')'郁闷啊~~
      

  2.   

    不深奥咧,太简单!!
    1.右击表格,点"作为服务器控件运行"
    2.代码就是:<table id="TABLE1" runat="server">
      

  3.   

    仍然用这段代码?还是提示
    Source line: Response.Write(" " 
    Description: 缺少 ')'
      

  4.   

    楼主不设置成服务端控件,也可用Cookis来控制:
    页面代码:
    <td style=" height: 20px;" bgColor="<%=Request.Cookies["myColor"].Value.ToString() %>" >cs代码:
    Response.Cookies["myColor"].Value = "blue";