can't hide button

J

jsh02_nova

I have a button of type System.Web.UI.HtmlControls.HtmlInputButton whose id
is 'btnReset', on which I would like to set the visibility style property.
I've tried:

btnReset.Style.Item("visibility") = "hidden"

and

btnReset.Style.Add("visibility", "hidden")

without success and the button remains visible. I should be able to do this
in the Page_Load event right? I've tried deleting and adding the button over
and over but I get the same resutlts. Has anybody had the same experience
and knows what the fix is?

thx
 
J

jsh02_nova

Oops, figured it out. Visual Studio didn't put in the runat="server"
attribute automatically like I'd assumed.

thx
 
S

sushmita

its very simple.
document.getElementById("btnReset").style.visibility = "visible"

the above code will work.


*I have a button of type System.Web.UI.HtmlControls.HtmlInputButto
whose id
is 'btnReset', on which I would like to set the visibility styl
property.
I've tried:

btnReset.Style.Item("visibility") = "hidden"

and

btnReset.Style.Add("visibility", "hidden")

without success and the button remains visible. I should be able t
do this
in the Page_Load event right? I've tried deleting and adding th
button over
and over but I get the same resutlts. Has anybody had the sam
experience
and knows what the fix is?

thx


-
sushmit
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,141
Messages
2,570,818
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top