码迷,mamicode.com
首页 > Web开发 > 详细

asp.net控件循环变色

时间:2014-04-29 10:13:46      阅读:438      评论:0      收藏:0      [点我收藏+]

标签:color   for   re   c   div   ar   

protected void lbtnState_Click(object sender, EventArgs e)
{
foreach (var item in div_state.Controls)
{
if (item is LinkButton)
{
(item as LinkButton).ForeColor = System.Drawing.Color.Black;
if (sender is LinkButton)
{
LinkButton btn = (LinkButton)sender;
if (btn.CommandName == "all")
{
DTcms.Common.Utils.WriteCookie("Rec_Res", "");
continue;
}
if (btn.CommandName == "success")
{
DTcms.Common.Utils.WriteCookie("Rec_Res", "true");
continue;
}
if (btn.CommandName == "wait")
{
DTcms.Common.Utils.WriteCookie("Rec_Res", "false");
continue;
}
}
}
}
(sender as LinkButton).ForeColor = System.Drawing.Color.Red;
ps.PageIndex = 1;
Bind_rpShow(ps);
}

asp.net控件循环变色,码迷,mamicode.com

asp.net控件循环变色

标签:color   for   re   c   div   ar   

原文地址:http://www.cnblogs.com/changji/p/3698747.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!