Friday, May 29, 2009

Manipulating div display in javascript and c#

To hide or show a div using javascript:
myDiv.style.display = "none";
myDiv.style.display = "block";

in C#:
myDiv.Attributes["style"] = "display:none;";
myDiv.Attributes["style"] = "display:block;";

No comments: