开发者

PostBack problem in menu

开发者 https://www.devze.com 2023-03-08 01:44 出处:网络
In my menu I have one item who has sub menus, in IE and Mozilla when i cross over that item its displays other sub menus,and in navigate link writes real path ..localhost...item.aspx , but in Chrome,

In my menu I have one item who has sub menus, in IE and Mozilla when i cross over that item its displays other sub menus,and in navigate link writes real path ..localhost...item.aspx , but in Chrome, when i cross it over in bottom left navigate link write this javascript:__doPostBack('ctl00$NavigationMenu','o\\Projects'), and in my code i dont have javascript anywhere. And when i click on that item menu ,my menu lost, but onlt on that item menu i have, 3 more and they work normaly, onlt this with sub menu doesnt work. SO if any have some ideas, please write it.

<div class="background">
    <asp:Menu ID="NavigationMenu" CssClass="NavigationMenu" StaticDisplayLevels="2" DynamicHorizontalOffset="1" StaticSubMenuIndent="1px" MaximumDynamicDisplayLevels="4" Orientation="Horizontal" StaticPopOutImageUrl="http://test.eu-seed.net/safenet/pict/drop-arrow.gif" DataSourceID="MenuSource" runat="server" Height="30px">
        <StaticMenuItemStyle ItemSpacing="10" CssClass="staticMenuItemStyle" />
        <StaticHoverStyle CssClass="staticHoverStyle" />
        <StaticSelectedStyle CssClass="staticMenuItemSelectedStyle" />
        <DynamicMenuItemStyle CssClass="dynamicMenuItemStyle" />
        <DynamicHoverStyle CssClass="menuItemMouseOver" />
        <DynamicMenuStyle CssClass="menuItem" />
        <DynamicSelectedStyle CssClass="menuItemSelected" />
        <DataBindings>
            <asp:MenuItemBinding DataMember="siteMapNode" NavigateUrlField="url" TextField="title" ToolTipField="description" />
        </DataBindings>
    </asp:Menu>
    ...
</div>

web.config

<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
  <siteMapNode&开发者_开发技巧gt;

  <siteMapNode url="~/Default.aspx" title="Home" description="Home" accesskey="H" />
  <siteMapNode url="#" title="Projects" description="Projects" accesskey="P">
        <siteMapNode url="~/Seed.aspx" title="SEED" description="SEED" accesskey="S" />
        <siteMapNode url="~/SEMS.aspx" title="SEMS"  description="SEMS" accesskey="M"/>
        <siteMapNode url="~/IPR.aspx" title="IPR" description="IPR" accesskey="P"/>
        <siteMapNode url="~/Beneficiaries.aspx" title="Beneficiaries"  description="Beneficiaries"/>
      </siteMapNode>
  <siteMapNode url="~/About.aspx" title="About" description="About" accesskey="T" />
  <siteMapNode url="~/Contacts.aspx" title="Contact" description="Contact" accesskey="E" /> 
      </siteMapNode>

</siteMap>


if (Request.UserAgent.IndexOf("AppleWebKit") > 0)
 {
   Request.Browser.Adapters.Clear();
 }

i found this, and write it in master page.cs in load page , and everything works well. This helps to render asp.net menu in Safari and Chrome .

0

精彩评论

暂无评论...
验证码 换一张
取 消