Solved

hide html reset button

Posted on 2009-05-05
5
324 Views
Last Modified: 2013-12-17
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
Comment
Question by:Mr_Shaw
  • 3
  • 2
5 Comments
 
LVL 39

Expert Comment

by:abel
ID: 24306452
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
 
LVL 39

Expert Comment

by:abel
ID: 24306492
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
 

Author Comment

by:Mr_Shaw
ID: 24306504
<input id="Button2" type="reset" value="Reset" />

I have tride Button2.visible = false

and it does not work.
0
 
LVL 39

Accepted Solution

by:
abel earned 500 total points
ID: 24306546
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
 

Author Closing Comment

by:Mr_Shaw
ID: 31578096
thanks
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now