在运行时更改Linkbutton CSS样式 [英] Changing Linkbutton css styles during Runtime

查看:227
本文介绍了在运行时更改Linkbutton CSS样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我想在运行时从同一CSS文件更改CSS样式.我正在执行以下操作.

Hi,
I want to change css style from the same Css file during runtime. I am doing this as follows.

aObjLnkBtn.CssClass.Remove(0, aObjLnkBtn.CssClass.Count());
aObjLnkBtn.CssClass = "selected"


但是,它尚未被应用.我该如何实现.
谢谢
Sreenath


But, it is not been applied. How can I achieve this.
Thanks
Sreenath

推荐答案

我这样做略有不同:

I do this slightly differently:

aObjLnkBtn.Attributes.Remove("class");
aObjLnkBtn.Attributes.Add("class", "selected");


这篇关于在运行时更改Linkbutton CSS样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆