Ok so I’m trying to set an unordered list from display none to block on a button click. I’ve set the css like so;
#ErrorDiv li{ color:#9a005a; font-weight:bold; display:none;}
So all my ListItems within my ErrorDiv don’t display. Problem is, how do I display them then on a button click? I’ve tried in my code;
ErrorDiv.Style.Add("Display", "block")
But obviously this only the ErrorDiv and not the children ListItems. I’ve also tried calling javascript functions but that was just a bit of a headache. I imagine there must be a simple way I can affect this one style property for the child elements?
Just to be clear, it’s not just button click -> Display. There’s some work that goes on server side before the Display.
you should try something like this.
I hope this works for you.