Xpode.com        Click here to Print this article.

Menus not working in Safari and Chrome

The reason for the issue is the rendering way of browsers. To solve these issues in the website you may have to change the some part on Pre Render. On Pre Render you need to enter the below code. This code will not effect on look and feel in Mozilla or Internet explorer.

in vb.net

Protected Sub Page_PreRender(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    If Request.ServerVariables("http_user_agent").IndexOf("Safari",
            StringComparison.CurrentCultureIgnoreCase) <> -1 Then Page.ClientTarget = "uplevel"    End If End Sub

On Page Pre render Write the below code. in c#.Net

   if ((Request.UserAgent.IndexOf("AppleWebKit") > 0)) 
        {     Request.Browser.Adapters.Clear(); }    if (Request.ServerVariables("http_user_agent").IndexOf("Safari",
            StringComparison.CurrentCultureIgnoreCase) != -1)
        {     Page.ClientTarget = "uplevel"; }

With this code your can make compatible the menus on chrome and safari.



http://
http://

Contributed by:
Rohit kakria
I am software developer

Resourse address on xpode.com
http://www.xpode.com/Print.aspx?Articleid=152

Click here to go on website