{"id":783,"date":"2009-08-31T17:11:56","date_gmt":"2009-08-31T16:11:56","guid":{"rendered":"http:\/\/www.galhano.com\/blog\/?p=783"},"modified":"2009-08-31T17:11:56","modified_gmt":"2009-08-31T16:11:56","slug":"problema-com-aspmenu-no-ie8","status":"publish","type":"post","link":"http:\/\/galhano.com\/blog\/?p=783","title":{"rendered":"problema com  asp:menu no IE8"},"content":{"rendered":"<p>O internet explorer 8 se tornou muito, muito mais compat\u00edvel com os padr\u00f5es <a href=\"http:\/\/www.w3.org\/\" target=\"_blank\"><strong><span style=\"color: #669922;\">W3C<\/span><\/strong><\/a> do que as vers\u00f5es anteriores.<\/p>\n<p>A diferen\u00e7a foi tanta que o <a href=\"http:\/\/www.microsoft.com\/windows\/internet-explorer\/beta\/default.aspx\" target=\"_blank\"><\/a><a href=\"http:\/\/www.microsoft.com\/windows\/internet-explorer\/beta\/default.aspx\" target=\"_blank\"><strong><span style=\"color: #669922;\">IE 8<\/span><\/strong><\/a> precisou criar o modo de compatibilidade, para que p\u00e1ginas que ainda n\u00e3o s\u00e3o totalmente compat\u00edveis com este padr\u00e3o possam continuar funcionando.<\/p>\n<p><a href=\"http:\/\/www.bufaloinfo.com.br\/ExibeNoticias.aspx?entryid=2863749141578046122\" target=\"_blank\"><strong><span style=\"color: #669922;\">Desenvolvedores podem configurar seus sites para serem sempre rodados em modo de compatibilidade<\/span><\/strong><\/a><\/p>\n<p>At\u00e9 mesmo o mais inesperado foi atingido pelas mudan\u00e7as no IE 8 : O webcontrol de menu nativo do <a href=\"http:\/\/www.bufaloinfo.com.br\/cursos\/aspnet2.asp\" target=\"_blank\"><strong><span style=\"color: #669922;\">ASP.NET<\/span><\/strong><\/a> n\u00e3o encontrava-se 100% compat\u00edvel com o W3C e consequentemente os sites que utilizam o webcontrol de menu apenas continuar\u00e3o funcionando em modo de compatibilidade.<\/p>\n<p>Existe uma solu\u00e7\u00e3o simples em <a href=\"http:\/\/www.maujor.com\/index.php\" target=\"_blank\"><strong><span style=\"color: #669922;\">CSS<\/span><\/strong><\/a> que os sites que utilizam o webcontrol de menu podem utilizar :<\/p>\n<div style=\"line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: consolas, 'Courier New', courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: gray 1px solid; padding: 4px;\">\n<div style=\"line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;\">\n<pre style=\"line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;\"><span style=\"color: #606060;\">   1:<\/span> <span style=\"color: #006080;\">&lt;<\/span><span style=\"color: #0000ff;\">style<\/span> type=\"text\/css\"<span style=\"color: #006080;\">&gt;<\/span><\/pre>\n<pre style=\"line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;\"><span style=\"color: #606060;\">   2:<\/span> <span style=\"color: #cc6633;\">.adjustedZIndex<\/span> {<\/pre>\n<pre style=\"line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;\"><span style=\"color: #606060;\">   3:<\/span>      z-index: 1;<\/pre>\n<pre style=\"line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;\"><span style=\"color: #606060;\">   4:<\/span>     }<\/pre>\n<pre style=\"line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;\"><span style=\"color: #606060;\">   5:<\/span> <span style=\"color: #006080;\">&lt;<\/span>\/<span style=\"color: #0000ff;\">style<\/span><span style=\"color: #006080;\">&gt;<\/span><\/pre>\n<\/div>\n<\/div>\n<p>Adiciona-se este estilo em uma masterpage, por exemplo, e define-se como a cssClass do dynamicMenuStyle :<\/p>\n<div style=\"line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: consolas, 'Courier New', courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: gray 1px solid; padding: 4px;\">\n<div style=\"line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;\">\n<pre style=\"line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;\"><span style=\"color: #606060;\">   1:<\/span> <span style=\"color: #0000ff;\">&lt;<\/span><span style=\"color: #800000;\">asp:Menu<\/span> <span style=\"color: #ff0000;\">ID<\/span><span style=\"color: #0000ff;\">=\"Menu1\"<\/span> <span style=\"color: #ff0000;\">runat<\/span><span style=\"color: #0000ff;\">=\"server\"<\/span><span style=\"color: #0000ff;\">&gt;<\/span><\/pre>\n<pre style=\"line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;\"><span style=\"color: #606060;\">   2:<\/span>     <span style=\"color: #0000ff;\">&lt;<\/span><span style=\"color: #800000;\">DynamicMenuStyle<\/span> <span style=\"color: #ff0000;\">CssClass<\/span><span style=\"color: #0000ff;\">=\"adjustedZIndex\"<\/span> <span style=\"color: #0000ff;\">\/&gt;<\/span><\/pre>\n<pre style=\"line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;\"><span style=\"color: #606060;\">   3:<\/span> <span style=\"color: #0000ff;\">&lt;\/<\/span><span style=\"color: #800000;\">asp:Menu<\/span><span style=\"color: #0000ff;\">&gt;<\/span><\/pre>\n<\/div>\n<\/div>\n<p>Sendo que esta \u00faltima parte pode ser feita atrav\u00e9s da janela de propriedades.<\/p>\n<p>Sem d\u00favida esta \u00e9 a forma mais simples de corrigir o problema. A Microsoft, por\u00e9m, por obriga\u00e7\u00e3o, disponibilizou um patch de corre\u00e7\u00e3o que resolve o problema do menu. A forma mais f\u00e1cil de localizar este path \u00e9 atrav\u00e9s <a href=\"http:\/\/support.microsoft.com\/kb\/962351\/en-us\" target=\"_blank\"><strong><span style=\"color: #669922;\">deste KB<\/span><\/strong><\/a> .<\/p>\n<p>Se voc\u00eas seguirem os links indicados no KB para o patch, encontrar\u00e3o descri\u00e7\u00f5es muito estranhas, se referindo a problemas do <a title=\"IIS 7\" href=\"http:\/\/www.iis.net\/\" target=\"_blank\"><strong><span style=\"color: #669922;\">IIS<\/span><\/strong><\/a> entre outros. Ocorre que o patch para o menu do ASP.NET foi discretamente inserido dentro destes outros.<\/p>\n<p>Considerando as dificuldades de instalar isso em provedores, por exemplo, a solu\u00e7\u00e3o com CSS \u00e9 bem mais simples<\/p>\n<p>por <a href=\"http:\/\/www.dihitt.com.br\/noticia\/aspnet-menu-e-o-internet-explorer-8\" target=\"_blank\">Dennes Oliveira <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>O internet explorer 8 se tornou muito, muito mais compat\u00edvel com os padr\u00f5es W3C do que as vers\u00f5es anteriores. A diferen\u00e7a foi tanta que o IE 8 precisou criar o modo de compatibilidade, para que p\u00e1ginas que ainda n\u00e3o s\u00e3o totalmente compat\u00edveis com este padr\u00e3o possam continuar funcionando. Desenvolvedores podem configurar seus sites para serem [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"close","ping_status":"close","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33,28],"tags":[],"class_list":["post-783","post","type-post","status-publish","format-standard","hentry","category-code-snippets","category-aspnet-20","author-admin"],"_links":{"self":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/783","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=783"}],"version-history":[{"count":2,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/783\/revisions"}],"predecessor-version":[{"id":785,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/783\/revisions\/785"}],"wp:attachment":[{"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=783"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=783"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/galhano.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=783"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}