|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
getting/chaning attributes on a DIV tag.Hi,
I am working on a page where I need to show/hide a DIV tag when a button is clicked. Below is how the DIV tag was set up on Page Load: div.Attributes.Add("style", "display:block;"); Is there a way that when the button is clicked, I can check the value on the "style" attribute, and if it's "display:block;", to set it to "display:none;"? Thanks! Yes, you'll need to output a bit of client side JavaScript to handle that as
I've done in this example: http://SteveOrr.net/articles/VisiPanel.aspx (The first block in the Render method of Listing One shows that code sample) Show quoteHide quote "JL" <J*@discussions.microsoft.com> wrote in message news:5D6128B4-6A71-4EC9-B6F7-134988C37F83@microsoft.com... > Hi, > > I am working on a page where I need to show/hide a DIV tag when a button > is > clicked. > > Below is how the DIV tag was set up on Page Load: > > div.Attributes.Add("style", "display:block;"); > > Is there a way that when the button is clicked, I can check the value on > the > "style" attribute, and if it's "display:block;", to set it to > "display:none;"? > > Thanks! >
How to set property "ReadOnly" on all TextBoxes on a WebForm
Composite Server Control and DefaultValue Attribute The case of the crazy reseting dropdowns :-( Please help! Converting the time from one timezone to another Looking for a book on writing ASP.NET Controls with VB.NET general request about links CompileWith From one form to another.. using ASPNET objects in custom webcontrol Indent Items in ASP:ListBox? |
|||||||||||||||||||||||