- public class RouteConfig
- {
- public static void RegisterRoutes(RouteCollection routes)
- {
- routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
- //enabling attribute routing
- routes.MapMvcAttributeRoutes();
- }
- }
Friday, May 20, 2016
Enable Attribute routing
How to prevent F12 on webpage?
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script>
$(document).keydown(function (event) {
if (event.keyCode == 123) {
return false;
}
else if (event.ctrlKey && event.shiftKey && event.keyCode == 73) {
return false;
}
});
$(document).on("contextmenu", function (e) {
e.preventDefault();
});
</script>
Subscribe to:
Posts (Atom)