Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Horizontal menu does not work properly

Status
Not open for further replies.

arada1

MIS
Dec 3, 2006
47
US
hi folks,
here is my situaton, I have designed a horizontal menu using asp.net built in controls and this horizontal menu links only works when i hover my cursor on the text and if i try without hovering on the text the link does not work and I donot know why this is happening ....any help would be appreciated
 
post your code and we can make some suggestions. thanks :)
 
Thank you tperri for your reply. I attached both the sitemap and horizontal menu code.As i have mentioned above I have to put my cursor on the horizontal menu or the dropdown text for the link to work.otherwise, if i put my cursor away from the text then you won't know whether that is a link . thank you for the help.



<asp:Menu ID="Menu1" Runat="server" DataSourceID="SiteMapDataSource1"
Orientation="Horizontal"
StaticDisplayLevels="2" Width="100%" StaticEnableDefaultPopOutImage="False" Font-Bold="True" BackColor="#FFFBD6" DynamicHorizontalOffset="2" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#990000" StaticSubMenuIndent="10px">
<StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
<DynamicHoverStyle BackColor="#990000" ForeColor="White" />
<DynamicMenuStyle BackColor="#FFFBD6" />
<StaticSelectedStyle BackColor="#FFCC66" />
<DynamicSelectedStyle BackColor="#FFCC66" />
<DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
<StaticHoverStyle BackColor="#990000" ForeColor="White" />
</asp:Menu>


<?xml version="1.0" encoding="utf-8" ?>
<siteMap>
<siteMapNode title="Home" url="index.aspx" roles="*">

<siteMapNode url="costIndex/cost.aspx" title="Cost Index" description="" roles="" >
<siteMapNode url="costIndex/Index2006.aspx" title="Cost Index year 2006" description="" roles="" />
<siteMapNode url="costIndex/Index2005.aspx" title="Cost Index year 2005" description="" roles="" />
<siteMapNode url="costIndex/Index2004.aspx" title="Cost Index year 2004" description="" roles="" />
<siteMapNode url="costIndex/Index2003.aspx" title="Cost Index year 2003" description="" roles="" />
<siteMapNode url="costIndex/Index2002.aspx" title="Cost Index year 2002" description="" roles="" />
</siteMapNode>

<siteMapNode url="" title="Letting Report " description="" roles="">
<siteMapNode url="513.aspx" title="One Item Per Line" description="" roles="" />
<siteMapNode url="613.aspx" title="Plan Holders List" description="" roles="" />
<siteMapNode url="52.aspx" title="Schedule Of Prices" description="" roles="" />
<siteMapNode url="62.aspx" title="Vendor List" description="" roles="" />
<siteMapNode url="53.aspx" title="Item Searh Page" description="" roles="" />
<siteMapNode url="63.aspx" title="English Item List" description="" roles="" />
<siteMapNode url="54.aspx" title="Metric Item List" description="" roles="" />
<siteMapNode url="64.aspx" title="Vendor Search page page vendor" description="" roles="" />
</siteMapNode>

<siteMapNode url="" title="Item Report " description="" roles="">
<siteMapNode url="~/costEstimate/fuelEsclation/Default.aspx" title="25% Fuel Esclation" description="" roles="" />
<siteMapNode url="61.aspx" title="25% Fuel Esclation" description="" roles="" />
</siteMapNode>

<siteMapNode url="" title="Financial Report " description="" roles="">
<siteMapNode url="financialRpt/financeRpt.aspx" title="Contract by Mile length" description="" roles="" />
<siteMapNode url="611.aspx" title="25% Fuel Esclation" description="" roles="" />
</siteMapNode>

<siteMapNode url="latLongRpt/LonglatRpt.aspx" title="Long/Lat Report " description="" roles=""/>


<siteMapNode url="contact.aspx" title="Contact us" description="" roles=""> </siteMapNode>

</siteMapNode>
</siteMap>




 
Hi,
I just had the same problem and I had to replace this html in the MasterPage source code:

<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" StartingNodeOffset="0" ShowStartingNode="true" />
<br />
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>


I ALSO USED THIS AS MY HTML SOURCE FOR THE MENU CONTROL:

<asp:Menu ID="Menu1" runat="server" Width="100%"
DataSourceID="SiteMapDataSource1" BackColor="lightblue"
DynamicHorizontalOffset="2" Font-Names="Verdana"
Font-Size="0.8em" ForeColor="#666666" StaticSubMenuIndent="10px" Height="7px" Orientation="Horizontal" DynamicVerticalOffset="5" StaticDisplayLevels="2" >
<StaticSelectedStyle BackColor="LightBlue" />
<StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" Width="100%" />
<DynamicHoverStyle BackColor="White" Font-Bold="False" ForeColor="Black" />
<DynamicMenuStyle BackColor="White" />
<DynamicSelectedStyle BackColor="White" ForeColor="Red" />
<DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" Width="100%" />
<StaticHoverStyle BackColor="LightBlue" Font-Bold="False" ForeColor="Black" />
</asp:Menu>


HTH, Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top