Common ASP. NET Tips

Source: Internet
Author: User
Tags servervariables
Skill 1. Oncontextmenu= "Window.event.returnvalue=false" will completely mask the right mouse button
<table border Oncontextmenu=return (false) ><td>no</table> available for table
2. <body onselectstart= "return false" > deselect, prevent copying

3. onpaste= "return false" is not allowed to paste

4. oncopy= ' return false; ' oncut= ' return false; ' Prevent replication

5. <link rel= "shortcut icon" href= "Favicon.ico" > IE Address bar before replacing their own icons

6. <link rel= "Bookmark" href= "Favicon.ico" > can display your icon in a Favorites folder

7. <input style= "ime-mode:disabled" > Close IME

8. Always with the frame
<script language= "JavaScript" ><!--
if (window = top) Top.location.href = "frames.htm"; Frames.htm for frames page
--></script>

9. Prevent a person from being frame
<script language=javascript><!--
if (top.location!= self.location) top.location=self.location;
--></script>

<noscript><iframe src=*.html></iframe></noscript> Web pages will not be saved as

<input type=button value= View Web page source code
onclick= "window.location = ' view-source: ' + ' http://www.csdn.net/'" >

12. How to use the ASP means to check whether the visitor used the agent
<% if Request.ServerVariables ("Http_x_forwarded_for") <> "" Then
Response.Write "<font color= #FF0000 > You have passed the proxy server," & _
"True IP is" &request.servervariables ("Http_x_forwarded_for")
End If
%>


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.