Jun 11, 2013

All Browser Supporting Tag for Asp.net Website

Below code paste in Head section of the Page

<head id="Head1" runat="server">
    <title>:: My Home ::</title>
      <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
      <meta content="blendTrans(Duration=0.50)" http-equiv="Page-Exit" />
      <meta http-equiv="Page-Enter" content="blendTrans(Duration=0.50)" />
</head>

Add Below code in File (VB) of Page


    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Request.UserAgent.IndexOf("AppleWebKit") > 0 Then
            Request.Browser.Adapters.Clear()
        End If
    End Sub

    Protected Overrides Sub AddedControl(ByVal control As Control, ByVal index As Integer)
        ' This is necessary because Safari and Chrome browsers don't display the Menu control correctly.
        ' Add this to the code in your master page.
        If Request.ServerVariables("http_user_agent").IndexOf("Safari", StringComparison.CurrentCultureIgnoreCase) <> -1 Then
            Me.Page.ClientTarget = "uplevel"
        End If

        MyBase.AddedControl(control, index)
    End Sub

No comments:

Post a Comment

What is the use of n-tier architecture and 3-tier architecture?

how to implement 3-tier architecture in asp.net using c#. 3-Tier architecture is also called layered architecture. Some people called it ...