hide or show empty view source from .aspx web page

Posted on 2010-01-12
Medium Priority
Last Modified: 2013-12-17
Hi All,
Have a default.aspx page. Avoid right click to view viewsource or show emty view source . Prefer not to use Javascript since user can disable the scripts and reload the page to see the viewsource.

Kind Regards,
Question by:poojasureshkumar
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 10

Expert Comment

ID: 26296146
I don't believe it is possible. "View Source" is part of browser's feature, you don't have control of it.

What are you trying to accomplish?

Author Comment

ID: 26296500
Hi Codingbeaver,
Simple javascript will void right click. But it could be accomplished by add-ons. I need the way to show emtpy view source or hide view source .
Reason is i don't want user to see the function name and way it handled on the form fields.

Kind Regards,
LVL 10

Expert Comment

ID: 26296651
If your functions are handled in code-behind, then user only sees the rendered HTML contents, they cannot see the details. As far as the function names and form fields, you can't hide them. Even you use JavaScript to disable the right-click, user can always click "View" from the browser menu and choose "Source" to view the HTML source.

Why do you not want user see the source? Without the source, browser cannot display anything.

Accepted Solution

poojasureshkumar earned 0 total points
ID: 26476259
Hi codingbeaver,
Handled in myself in javascript. but it is wasy to break. No problem.

Kind Regards,

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

764 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