Powered by Blogger.
Archive for 2014
Add Styles Dynamicaly
Here is the way to add styles content dynamically i.e with in the code . Here control name is "Test"
test.Style.Add("display", "none");
or
test.Attributes.Add("style", "text-align: center;");
or
test.Attributes.Add("class", "centerIt");
or
test.Attributes["style"] = "text-align: center;";
or
test.Attributes["class"] = "centerIt";