hide html reset button

I have an HTML reset button which I would like to hide using c#.

I have trided doing reset.visible= false;

but this does not work.

can anybody help.
Mr_ShawAsked:
Who is Participating?
 
abelCommented:
see above (first and second comment): what you need is the runat="server" part. Without that, it will indeed not work. The runat="server" says to ASP.NET to use any ordinary HTML element and make it programmable.
0
 
abelCommented:
How do you declare the reset button? If the ID of the reset button is "reset" and if the runat="server" is present, you can so with the code snippet you say... Otherwise, please show the declaration of the reset button and we go from there
0
 
abelCommented:
If this is in your aspx:

<input type="reset" runat="server" id="myresetbutton" value="reset me" />
then this can go in your code behind to hide the reset button:

myresetbutton.Visible = false;
0
 
Mr_ShawAuthor Commented:
<input id="Button2" type="reset" value="Reset" />

I have tride Button2.visible = false

and it does not work.
0
 
Mr_ShawAuthor Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.