易截截图软件、单文件、免安装、纯绿色、仅160KB

C#控制背景色ASP.NET

    protected void Page_Load(object sender, EventArgs e)
    {
              form1.Style.Add(HtmlTextWriterStyle.BackgroundColor, Profile.PreferredBackgroundColor.ToString());
    }

//情况是我的背景已经存入数据库中,这点可以排除,因为我用的this.lable1.backcolor=Profile.PreferredBackgroundColor已经成功,
现在就是想问下,窗体怎么显示背景色,用C#,在WEB页中控制,不是WINFORM,谢谢

  protected void Button1_Click(object sender, EventArgs e)
    {
  Profile.PreferredBackgroundColor = Color.fromName(ddlColor.SelectedValue);
        Response.Redirect(Request.Url.LocalPath);
    }
直接用
C# code:

protected void Page_Load(object sender, EventArgs e)
{
form1.Style.Add(HtmlTextWriterStyle.BackgroundColor, "red");
}


是好使的阿

断点调试一下,看看你点按钮后的pageload里的Profile.PreferredBackgroundColor是不是有值

调试是最好的差错方法,很实际,我喜欢。支持。


如需要阅读该回复,请登录或注册CSDN!




相关问答:

C#调用 C DLL问题,懂的来抢分了

//C 接口
extern "C"
{
  TESSDLL_API int __cdecl GetTessText(const char *imagefile, char *text);  
}
//我在C#中声明
//调用C DLL 中的函数
[DllImport("OCRapi.dll&quo ......

c# 有没有用于C/S的 html文本编辑器

c# 有没有用于C/S的 html文本编辑器

就像web界面的文本内容编辑器


up

C/S还要编译器干嘛啊
又不用控制样式
貌似没有吧  如果有了通知下我  我也要liujintaohfbb@163.com我的邮箱 ......

asp.net分页问题

select top 12 * from Product where [id] not in (select top 12 [id] from Product)
这样可以分页,但是我在后面想加个条件
select top 12 * from Product where [id] not in (select top 12 [id] from Prod ......

asp.net关于登陆问题

欢迎您:*****|退出|登录注册|
嘛意思?

and the question?

just ajax, display the username
or then this is must be the ascx.webcontrol, location.href it display is ok.

当会员登陆时,会显示用 ......

asp.net 上传文件时显示进度条

文件上传时怎样显示进度条 最好给个Demo 谢了~!
用Ajax吧,Ajax有例子

用 ajaxtoolkit 里面的代码,有例子

引用
用Ajax吧,Ajax有例子



http://topic.csdn.net/u/20091010/23/4bb5017a-ac75- ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号