Problem with XML menu in Google chrome browser

 

When I working in Asp.net 2.0, I faced below problem.

I have XML based menu in my web page. It is working fine with Internet Explorer and Firefox browser. But when it comes to Google Chrome menu is not rendering properly.

 

Finally I came to know that, Google Chrome does not display/render XML content on the browser.

I found the solution somewhere to overcome this problem.

 

That is, add this below code in Page_load Event.

 

if (IsPostBack == false)

{

if (Request.UserAgent.IndexOf("AppleWebKit") > 0 | Request.UserAgent.IndexOf("Unknown") > 0 | Request.UserAgent.IndexOf("Chrome") > 0)

{

Request.Browser.Adapters.Clear ();

}

}

 

Let me know if anyone knows solution except above one.

 


Next Recommended Reading GridView with Context Menu in ASP.NET