Click here to Skip to main content
15,352,892 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
how to disable save button(On Click webpage) in webpage
Orcun Iyigun 11-Feb-13 5:01am
You have to be more specific about your problem!!
Karthik Harve 11-Feb-13 5:01am
your question is not not so clear. what is a difficulty in disabling the button ?
ridoy 11-Feb-13 6:43am
too much incomplete for helping you..
Dee_Bee 11-Feb-13 23:38pm
try this Dheerendra,

btnSave.Enabled = false;


You can't prevent that the user saves the HTML content that's rendered in the browser. But note: if the user saves a web page, then (s)he saves the client code (the HTML code that's rendered in the browser, and some JavaScript code). The user can't save your ASP.NET code (in the .aspx file) and the code-behind file.

If you ask "Why the user can't save the ASP.NET code and the code-behind file?".
Then this is the answer:

The user sends a request to the server, for example the user requests Default.aspx.
Then the server of your ASP.NET web site will send a response. The server don't will respond with ASP.NET code or a code-behind file, but with HTML code. And that HTML code is rendered in your browser.
btnID.Enabled = false;

Try this ....
Dheerendra Dwivedi 11-Feb-13 5:38am
I want to Secure my webpage,this means Nobody can save my page on browser.
Orcun Iyigun 11-Feb-13 6:15am
You mean bookmark your page??? You are not helping us by saying a few and expecting a lot ?!?!?!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900