Introduction to ASP. NET browser Filtering

Source: Internet
Author: User

ASP. NET browser Filtering

If you want the ASP. NET Server Control to have different values in different browsers, you can declare it as follows:

 
 
  1. <Asp: Button Ie: Text="IE text" Runat="Server" Mozilla: Text="FF text" /> 

A full mark:

ASP. NET browser filtering is appended to the Text and OnClientClick attributes through the prefix of ie and mozilla.

ASP. NET browser filtering in IE:


ASP. NET browser filtering in Firefox:


Note: If the browser on the client is neither IE nor FF, the general attribute value is used by default, and IE does not distinguish IE6 from IE7...

Although this is only a simple Text attribute, it can also be all other attributes except ID and event processing function name ..

Offline website

This technique may be widely known. If you create a “app_offline.htm file under the ASP. NET application, all requests to the website will be redirected to “app_offline.htm "..

This function is very good. It is generally used for website maintenance, upgrades, and database reasons. It is also very flexible and allows the entire site to be offline rather than going to IISRESET ..

To unlock the app_offline.htm file, delete the “app_offline.htm file directly, or change the “app_online.htm file to “app_online.htm "..

Note: The number of bytes in the “app_offline.htm file must be greater than 512 bytes; otherwise, IE will process the 404 error page ..

  1. Implementation of ASP. NET plug-in
  2. Overview ASP. NET Applications
  3. Introduction to ASP. NET 2.0 Data Binding
  4. ASP. NET prevents Java Script Injection attacks
  5. ASP. net mvc using T4

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.