Web Forms :: Menu Control Not Rendering Hover Styles Correctly

Aug 22, 2010

I've encountered was appears to be a strange bug with the menu control, and alas, I am unable to find much useful information on it (which leads me to believe I have something installed or confingured incorrectly). Here the problem:

When declaring a menu control with a staticHoverStyle, for example:

<asp:Menu
ID="navMenu"
DataSourceID="srcSiteMap" [code]....

Has no effect on the behavior of the control once it's rendered, neither in Firefox nor IE.In fact, using the source code at

http://msdn.microsoft.com/en-us/library/ms366731.aspx with no modifications also results in the hoverstyle not working.

This problem seems to be "fixed" if you specify the css attribute declaratively, for example, StaticMenuItemStyle-BackColor="Yellow".
Alternatively, if you specify RenderingMode="table" then the hoverstyle seems to work. It's only when you're using a cssclass with a list that things seem to mess up.

Finally, I notice that in the rendered html, the control embeds some styles between /* <![CDATA[ */ and /* ]]> */ comments that affects the final appearance of the menu control, sometimes overwriting a cssclass you specified (ex: the margin for dynamic menus can only be controlled with the HorizontalOffset property, and not by css). This is undesirable, but I don't see anything that seems to overwrite the behavior of hover elements. Actually, the .hoveritem class doesn't appear anywhere in the markup at all, but when you specify the StaticMenuItemStyle-BackColor property, then the value is rendered correctly in this block of styles.

View 3 Replies


Similar Messages:

Web Forms :: TreeView Control Not Rendering Styles Correctly In Chrome, Firefox, Safari, But Fine In IE

Feb 15, 2010

I've defined node styles for my TreeView instance in markup (using <LevelStyles> for example). Everything renders correctly in IE7/8 but, when rendering in Chrome, Safari or FireFox, the styles are not being applied. From looking at the source code for the page, I can see that the various runtime css classes are being injected into the top of the page, but the class attributes on the <a> tags (within the generated TreeView HTML) are empty (class=""). In IE, the class attributes contain references to the classes that were injected into the page.

Can anyone explain why this is happening? I can see no logical explanation for this, and it's a big issue - My client primarily uses Safari, as they're Mac based.

View 1 Replies

Web Forms :: How To perform An Image Swap On Hover, Selected Styles For Menu

Sep 18, 2010

I am using the following code to create a static menu, but using images instead of text..

[Code]....

how to perform an image swap on hover and also an image swap on click so that it is clear which menu item has been selected?

View 3 Replies

Web Forms :: Add Static And Hover Images To Menu Control?

Feb 5, 2010

i have a menu control which i get text from a sitemap.

But i want to use hover images and static images? can this be achieved?

View 2 Replies

Web Forms :: Display Static Sub Menu Control Instead Of Hover

Aug 7, 2013

ASP.NET Menu Control displays the submenu when hover on root menu.

Is is possible to display submenu permanently without using hover or click on root menu?? if yes then how?

View 1 Replies

Web Forms :: Menu Control Creating Unwanted Styles?

Jul 7, 2010

I have created a menu in ASP.net 4.0 which is is rendered as UL/LI

However I am frustrated with ASP as it produces unwanted style e.g. style="position: relative; width: auto; float: left;" in the UL tag according to firebug. I would really like it to render without this.

A second question is the output in firebug is not the same as if I look at the page source i.e. the style="..." is not in the UL? Is Firebug wrong...can it be trusted?

The ASP is as follows:

<asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server">
<asp:SiteMapDataSource runat="server" ID="siteMapDataSource" ShowStartingNode="false" />
<asp:Menu runat="server" Orientation="Vertical" DataSourceID="siteMapDataSource" RenderingMode="list" /> [code]....

View 6 Replies

C# - Menu Control In Master Page Fails To Use CSS Styles?

Jun 2, 2010

I'm working on a web application that uses ASP.NET 3.5 and C#. Structurally, I have a master page with a menu control on it. The control serves as my navigation, and it gets its items from a SiteMapDataSource control and a corresponding Web.sitemap file.

The problem is that some styles do not render properly when you specify the CssClass property. More specifically, the selected and hover styles don't respond to css styles. Consider the code below:

[code]....

any insight into what is causing this problem and how to neatly work around it? I'm aware I might be able to programmically determine the current page and select the corresponding menu item manually so it receives the proper style class, but before I resort to hacking C# and Javascript together to fix this functionality.

View 4 Replies

AJAX :: How To Slove The Hover Menu Extender With Slider Control

Aug 24, 2010

iam placing the textbox of slider control in one panel and this panel iam showing when mouse goes to a linkbutton by using hover .the problem is when iam using slider extender with hover iam getting the following error for the slider control ---the errro is set valid value for the height and widht attributes in the slider css classes..how to solve this problem

View 3 Replies

Web Forms :: Menu Control Not Rendering In Chrome & IE8?

Jul 28, 2010

I am testing my website in numerous browers and have discovered (amazingly) that the asp:menu

control does not render properly in both the above browsers! Given that these browsers must account for

a large part of internet traffic it is curious that microsoft have not fixed this. I have looked at CSS Friendly but

if looks like a lot of work and change for my websites just for the one control that does not work.

View 1 Replies

Web Forms :: Rendering A Menu Control To A String?

Sep 26, 2010

why the following code bombs with a NullReference exception.

[Code]....

I just want to output the html for the menu control to a string, if I remove the line that adds the new menu item or I change the control to a calander control instead of a menu control the it works fine.

View 7 Replies

Web Forms :: Highlighting Menu During Sub Menu Hover?

Oct 4, 2010

I can highlight a menu-itm when the mouse is hovering over it. How do I highlight a menu item when a sub-menu item is hovered? I have a 4 level menu, 2 static accross the top, one drop-down, and one pop-out from the drop-downs.

While selecting level-4 items, it is a little confusing as to which level-3 item is being popped-out because I have alot of level 3 and level 4 items. I want the appropriate level 3 item highlighted while hovering over its level 4 popout.

View 3 Replies

Web Forms :: Object Reference Error While Rendering Menu Control

Sep 21, 2010

I am having a problem with rendering a menu control inside a server control. I am getting an error in the RenderContents override method when I try to render the Menu Control. The error I am getting is an Object Reference error. The code is below...

[Code]....

View 7 Replies

Web Forms :: Display Menu Control Items Like Table Without Setting Rendering Mode?

Mar 2, 2011

I hate tables - don't want to use tables, unless I have tabular data to display. A menu is not tabular data (as far as I am concerned.) I was elated to see that in asp.net 4 - the menu control renders as a <ul> <li>, instead of as a table. However - try as I might, I can not get a horizontally orientated Menu to split into even columns, and text align center. FYI - I don't use fixed width - so I can't just set a width to 1000 - and separate it into even columns. Besides that, I want it to change width dynamically, based on the number of "columns (menuItems)" there are. Is it possible to spread out the <li> menu items evenly across the space I provide for them in their containing div or will I have to quite using menu controls, and start using JQuery Menu's?

View 2 Replies

AJAX :: Trying To Develop Menu Usings The Hover Menu Extender?

Mar 7, 2010

I am trying to develop menu usings the hover menu extender. I have nested menus - in other words, if some items in the drop down menu (hover) have menu items that are displayed next to it (using another hover menu extender control). I am trying to keep the original menu displayed when the sub menu is displayed, but with no luck. I have tried using animation, but that doesn't seem to work.

View 9 Replies

Web Forms :: How To Set Layout And Styles Of Menu

Jun 26, 2010

i have cretaed a Menu control in asp.net. I want to set MenuItems at certain alignment position,i.e., certain horizontal and vertical alignment. How to set these styles in Menu Control ?

View 2 Replies

Forms Data Controls :: Gridview With Hover Menu Breaks In 4.0?

May 4, 2010

I have a gridview with a popup menu that successfully runs against Framework 3.5.

In 4.0, the popup no longer seems to be tied to the row that was mouse-overed. the popup still appears, but near the top of the gridview (not near the row) regardlesss of the row that mouse-overed and clicking "Edit" will only edit the top (first) row.

I even tried to simplify and use this example [URL] as a test, the same results occur, run this against 3.5, it works fine, run against 4.0, it breaks. I think there's something wrong with the C# code

[Code]....

there's a better solution with the ClientIDRowSuffix?

View 4 Replies

Forms Data Controls :: How To Create A Gridview With A Hover Menu

Mar 23, 2010

I'm trying to create a gridview with a hover menu:

[Code]....

This works just fine, butttttttttt, I want the hover menu to have an extensive description of the record, namelly ID, message, links to uploaded files, print record button etc.

This doesen't work with the hover menu because when the mouse leaves the targetcontrolid the panel disapears.

So my question is:

Is there a way keep the panel hovering until you change to another record?

View 3 Replies

C# - How To Add Attributes Correctly Upon Rendering With A HtmlTextWriter

Oct 18, 2010

I want to add the href attribute to a link element. This is my code:

[code]....

What went wrong and how can I fix this issue?

don't answer that I could assemble the string in some other way. I want to know how I can achieve this with the HtmlTextWriter

View 1 Replies

HtmlHelper Using ViewContext.Writer Not Rendering Correctly?

Aug 30, 2010

I am building a simple CMS with asp.net MVC and I have almost all the parts working. I have one minor issue which I can't work out how to solve. I have a Html helper method that renders the content of area. This method however uses the Response.Write to write its content rather than returning a string. The reason for this is that I'm performing a partial request and hence do not have a string to return.

My template body looks like this:

<body>
<h1>Default Template</h1>
<% Html.ContentArea("Main"); %>
</body>

The problem I'm having is that the content renders above the H1 tag. My understand was that the h1 should already be in the response and my call to response.Write() would therefore append content after that point. This is obviously not happening. What am I missing here.

I've used partial requests before and they always render in the correct place. I haven't yet used them with MVC 2, this could possibly be the problem.

Below is the content area extension method. The widget render method varies and is where the partial request occurs. However even the start and end container tag render above h1 so it has to be something fundamental I'm doing wrong.

public static void ContentArea(this HtmlHelper htmlHelper, string areaName)
{
var container = new TagBuilder("div");
container.GenerateId(areaName);
container.AddCssClass("content-area");

[Code]....

View 1 Replies

AJAX :: ComboBox Not Rendering Correctly In MasterPage?

Mar 15, 2011

When I add an ajax combobox (WindowsStyle Css) to a web page that uses a masterpage the arrow button is vertically offset from the rest of the combobox. however if I add it to page without masterpage then it works fine.I am using the images and provided css styling provided by ajax toolkit. I tried removing the site css file but that didn't help either. Any ideas what could be causing this? Code is below for a sample in Master/Content Page:

[Code]....

View 3 Replies

AJAX :: Add Hover Menu To GridView?

Mar 21, 2011

I wanted to replicate this on my website. I already hava a gridview with data from my database, and now i wnated to add the hover menu to each row of the gridview. How can i accomplish this?

View 3 Replies

Implent Ajax Hover Menu In Grid?

May 7, 2010

Can any one help me to implent ajax hover menu in my grid i did the way which they mentioned in http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/HoverMenu/HoverMenu.aspx

but i am not able to find here is my grid view

[Code]....

View 3 Replies

Creating Ajax Hover Menu With Application?

Oct 16, 2010

i would like creating ajax hover menu with asp.net application in profeesional way

View 1 Replies

AJAX :: Hover Menu Is Not Working In Modal Pop Up Extender?

Jan 20, 2010

i am displaying drop down in modal pop up ,when i validate ,i want to show error through hovermenu ..error is

Line: 4044

Error: Sys.InvalidOperationException: Two components with the same id 'hm1' can't be added to the application.

if i use outside (not in modal pop up ) hover menu is working properly

[Code]....

View 2 Replies

AJAX :: Gridview Detail With Hover Menu Extender?

May 17, 2010

[Code]....

[Code]....

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved