In my project, there is css class to control the design of everything.
Now I want to change dynamically the value / properties in css class if I click buttons.
Can anyone solve my problem?
Thanks a lot :-)
Know the answer? Post it. Somebody with the same question will find it here.
Amitesh VermaRank #2,535 · 552 reputationPosted Aug 5, 2015, 8:44 PM EDT
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Aug 5, 2015, 8:56 PM EDT
In code behind :
Syntax1:
Ex :txtName.Style.Add("Background-color", "#ccc");
Syntax2:
Ex: txtName.Attributes.Add("class", "clstest");
Asp.Net HeinRank #6,010 · 279 reputationPosted Aug 5, 2015, 10:13 PM EDT
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Aug 5, 2015, 10:52 PM EDT
Use this-
Ex :txtName.Style.Add("Background-color", "#ccc");
Asp.Net HeinRank #6,010 · 279 reputationPosted Aug 19, 2015, 1:50 AM EDT
Arjunan SelvamRank #2,179 · 651 reputationPosted Aug 19, 2015, 1:59 AM EDT
Raja TRank #685 · 3.5K reputationPosted Aug 5, 2015, 8:14 PM EDT
Raja TRank #685 · 3.5K reputationPosted Aug 5, 2015, 10:31 PM EDT
Asp.Net HeinRank #6,010 · 279 reputationPosted Aug 5, 2015, 11:01 PM EDT
Raja TRank #685 · 3.5K reputationPosted Aug 5, 2015, 11:21 PM EDT
Raja TRank #685 · 3.5K reputationPosted Aug 5, 2015, 11:27 PM EDT
Asp.Net HeinRank #6,010 · 279 reputationPosted Aug 5, 2015, 11:52 PM EDT
Raja TRank #685 · 3.5K reputationPosted Aug 6, 2015, 1:36 AM EDT
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Aug 5, 2015, 11:26 PM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts