• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 351
  • Last Modified:

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.
0
Mr_Shaw
Asked:
Mr_Shaw
  • 3
  • 2
1 Solution
 
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
 
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
 
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.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now