我在用C#做asp.net时,需要用程序控制页面的背景颜色和背景图片,我在CS文件里我可以获取背景颜色值和背景图片,但就是不知道怎么应用到ASPX页,请高手指点
我在CS里这样写:
string  YS = Request.QueryString["YS"];
if (YS.Length < 6)
{
YS = "FFFFFF";
}在ASPX这样用:
<body MS_POSITIONING="GridLayout" bottomMargin="0" leftMargin="0" topMargin="0" rightMargin="0" bgcolor="#<%=YS%>">但出现这样的错误:编译错误 
说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。 编译器错误信息: CS0103: 名称“YS”在类或命名空间“ASP.Index_Xiaoyuan_aspx”中不存在源错误: 行 11:  <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
行 12:  </HEAD>
行 13:  <body MS_POSITIONING="GridLayout" bottomMargin="0" leftMargin="0" topMargin="0" rightMargin="0" bgcolor="#<%=YS%>">
行 14:  <form id="Form1" method="post" runat="server">
行 15:  <table width="330" height="251" border="0" cellpadding="0" cellspacing="0">