Click here to Skip to main content
15,898,035 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi sir i want code to retrict to
copy and save of asp.net page
Posted
Comments
[no name] 10-Feb-12 6:24am    
Oh yes, I want to have something like that too.
Ankur\m/ 10-Feb-12 7:19am    
:D

But user can copy the content by viewing the view source of the page.

If still you want then check this Tip/Trick
Disable right click context menu cut, copy, paste[^]
 
Share this answer
 
Comments
Espen Harlinn 11-Feb-12 6:14am    
5'ed!
A user will not know that a page is an ASP.NET page because ASP.NET engine renders corresponding HTML to the browser. So all the important and non-revealable logic that you have written is still safe unless someone doesn't get access to your web server (still your .cs files are safe until they are not decompiled).

I somehow feel that you want to disable copy-paste of the HTML content. You can't really do that 100% fool proof. Your best bet is to disable right click on you web page (please search Google on how to do that). But disabling javascript on browser will still allow a user to copy the content.
If you are still very concerned about your code, create the whole page in flash which is not really a very good idea.

Hope this helps!
 
Share this answer
 
Comments
Ankur\m/ 10-Feb-12 8:32am    
I forgot to submit the answer and it was lying opened in one of my tab. I would have never realised if my FF wouldn't have given the Leave Page alert. :doh:
Too much of work. Need a beer now. ;)
hi,
The only way to have a user not be able to save a file is to not send it to them.
 
Share this answer
 

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