Link to home
Start Free TrialLog in
Avatar of suresh pondicherry
suresh pondicherryFlag for United States of America

asked on

hide or show empty view source from .aspx web page

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,
Pooja
Avatar of codingbeaver
codingbeaver
Flag of United States of America image

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?
Avatar of suresh pondicherry

ASKER

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,
Pooja
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.
ASKER CERTIFIED SOLUTION
Avatar of suresh pondicherry
suresh pondicherry
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial