[SOLVED] how to display none through code behind

Issue

I have tried this

login_div.Style("display") = "none";

But it’s not working.how can I set the display of the div to none through code behind,
in aspx I have a div:

<div id="login_div" runat="server">

Solution

I believe this should work:

login_div.Attributes.Add("style","display:none");

Answered By – Mark Sherretta

Answer Checked By – Robin (BugsFixing Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *