Click here to hide categories Click here to show left categories

User: Home          welcome : Guest          Log In / Register here     




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.

Share this article   |    Print    |    Article read by 4528 times
Author:
Rohit kakria
I am software developer
Related Articles: No related article
Related Interview Questions: No related interview question