Weird Behavior With asp.net 3.5 Menu Server Control

J

Joey

VS2008
C#

Hey guys, something crazy is going on when I try to view my website
with either Google Chrome or Apple Safari. For some reason the web
server is sending extra markup to the site's navigation menu
(generated off a Menu server control).

You can see what I'm talking about if you use either of these browsers
and visit the live site...

http://brillyant.com

....look at the yellow navigation menu in the upper right corner.

Any ideas about what's causing this? How can I fix it?

Thanks!
 
B

bruce barker

this a common problem with the asp.net controls. they count on a properly
maintained browsers cap file to know what html to render. you need to update
this file, so that chrome and safari are known to be w3c compliant.

google browsercap for solutionsi. I stopped using any server control that
count on it long ago to avoid this issue.

-- bruce (sqlwork.com)
 
J

Joey

this a common problem  with the asp.net controls. they count on a properly
maintained browsers cap file to know what html to render. you need to update
this file, so that chrome and safari are known to be w3c compliant.

google browsercap for solutionsi.  I stopped using any server control that
count on it long ago to avoid this issue.

-- bruce (sqlwork.com)

Thanks, Bruce. I found a cumbersome, but effective solution. I handled
each page's Pre_Init event and use the following code...

if((this.Request.ServerVariables["http_user_agent"].ToString().Contains("Chrome"))
||
(this.Request.ServerVariables["http_user_agent"].ToString().Contains("Safari")))
{ this.Page.ClientTarget = "uplevel"; }

Works like a champ (for now).

Thanks,
JP
 
J

Joey

Thanks, Bruce. I found a cumbersome, but effective solution. I handled
each page's Pre_Init event and use the following code...
if((this.Request.ServerVariables["http_user_agent"].ToString().Contains("Ch rome"))
||
(this.Request.ServerVariables["http_user_agent"].ToString().Contains("Safar i")))
{ this.Page.ClientTarget = "uplevel"; }

AAMOI, simpler solutions in terms of maintainability would be either to
create a base class which inherits from Page and give it the above method
and then get all your other pages to inherit from it, or use a MasterPage /
content pages architecture...

I also thought that. The source stated that it would not work with
master pages.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top