Menu control in .net 2.0

I am creating my new app. in visual studio 2005 using vb.net 2.0

I created menu (with sub menu) on my header user control. Menu based on sitemapdatasource. Here is the code for menu and css file.

<asp:menu id="menua" runat="server" 
                    datasourceid="SiteMapDataSource1"
                    cssclass="menua"
                    orientation="Horizontal"
                    maximumdynamicdisplaylevels="1"
                    skiplinktext=""
                    staticdisplaylevels="2" />
                </div>

.menua {
 margin: 5px auto 2px auto;
 right: 37px;
 top: 13px;
 text-transform: uppercase;
 font-size: 11px;
 background-image: url("../menu.gif");
}

.menua a:visited, .nav a:visited {
 color: #DBB94F;
}

It works fine. If i want a change background image or color and font color for sub (drop down menu). How can i do that so insted of defaut sub menu color i can use my color or image.

Thanks,

0
drpkrupa
11/21/2006 4:50:59 PM
asp.net.navigation-controls 13714 articles. 0 followers. Follow

2 Replies
593 Views

Similar Articles

[PageSpeed] 8

Hi there,

try lookin at the dyamanic style of the menu at design view 

0
Lu5ck
11/22/2006 3:20:37 PM
You can change all from design view. Right Click on the Menu control in design view, choose property, You will get all the options. or in your code see those following line

..menua {
 margin: 5px auto 2px auto;
 right: 37px;
 top: 13px;
 text-transform: uppercase;
 font-size: 11px;
 background-image: url("../menu.gif");
}

..menua a:visited, .nav a:visited {
 color: #DBB94F;


You can change in this section too to find the effect. For example change the background-image: url("../somthing.gif); and see the change. the something.gif file has to be on that folder. all line under .menua is called a css class. You can change any visible property from here. Hope You can do that:)

Happy Coding
0
asifdhk
11/23/2006 12:53:59 AM
Reply:

Similar Artilces:

Differences between .net 1, .net 1.1, .net 2.0 and .net 3.0 #2
Hi, This seems to be a common question, but i havent got an answer yet:(Can, any one please explain me the differences between these versions.If you keep your feet firmly on the ground, you'll have trouble putting on your pants! There are too many differences for one email - - from 1.0 to 1.1 (not a whole lot of real change, other than fixes, at least compared to 1.1 to 2.0) With 2.0, there were many new declarative controls, with many new ideas added in With 3.0, it's a superset of 2.0 - instead of replacing the installation completely, it just 'added on' new functionality - I would...

Button image for each top level menu item
For the subpage items I am just going to use background images/styles, but for the top level menu items, I have a button for each one. Just to complicate matters I have a rollover image for each, so when the user's mouse hovers over a given menu item, the button swaps out so they see a different color. Can I do images for the top level menu items? Are rollovers possible as well? How? Appreciate any input. I'm still trying to figure this one out. Has anyone used buttons for their top level menu items? If you could copy the info from your web.sitemap + the css file that would be most help...

How to validate controls on a .NET 2.0 Web user Control
Hi Guys, (ASP.NET 2.0 / C#) I've looked thorugh every post on validating web user controls (and know about Pter Blum's Professional Validation and More package) - but can't seem to get my head around whre to start. I have a web user control, called wucICL.ascx on a we page called AddEditInvestment.aspx.  I would like to validate a couple of DropDownLists (ddlAccounts and ddlContacts) when the Insert and Update buttons are clicked on the AddEdit Investment page. The other controls on the AddEditInvestments page belong to a validation group called All Validators and the DropDownL...

.NET 2.0 Menu Control problem
I have a Menu Control in a Web Form.  The menu is databound to an XMLDatasource, with JPG images for the static menu items.  Inside the page_load sub, I have a for each loop which changes some of the static menu items to "selectable = false".  I.e. user must choose a submenu item to proceed.  I have one "filler" graphic on the far left which is just a blank bar.  Whenever that item has selectable = false, it does not render correctly.  The graphic appears 42 pixels high instead of 39.  The really strange thing is, I have the same menu (with the same code) i...

Running server controls compiled for .NET 1.1 in .NET 2.0
Hello, I have tried upgrading our ASP.NET 1.1 application to .NET 2.0 by using Web Application Projects, and it works beautifully. We use several 3rd party controls that we bought for use in .NET 1.1 and these seem to just work in .NET 2.0, except that I get an intermittent problem with one of them. Should DLLs compiled using .NET 1.1 simply work, except if they access classes that have been removed from the framework in .NET 2.0? If I have both .NET 1.1 and .NET 2.0 present on the machine and the ASP.NET application is configured to run using .NET 2.0 and I have a DLL compiled using .NE...

How to assign a dataset to a menu control in .net 2.0?
I created a menu control in the master page.  When I tried to assign a dataset to the menu's datasource (Menu1.datasource = ds), I got the Error "HierarchicalDataBoundControl only accepts data sources that implement IHierarchicalDataSource or IHierarchicalEnumerable."  I did research on the internet about IHierarchicalDataSource, but still don't understand.  Has anyone used it?  Can you please share with an example? Thanks, DanYeung The error is most likely because the menu control expects a hierarchical data source (xml file) and not a relational as the datas...

Differences between .net 1, .net 1.1, .net 2.0 and .net 3.0
Hi, This seems to be a common question, but i havent got an answer yet:(Can, any one please explain me the differences between these versions.If you keep your feet firmly on the ground, you'll have trouble putting on your pants! Have a look into this links http://en.wikipedia.org/wiki/.NET_Framework http://blogs.msdn.com/mohammadakif/archive/2006/12/03/net-3-0-different-versions-of-the-net-framework.aspx http://www.codeproject.com/aspnet/ComparisonASP1xASP20.aspAshok Rajawww.iGold.inDon't forget to click "Mark as Answer" on the post that helped you. This credits that m...

Master Details in two seperate GridView Controls
I am simply trying to have a list of people in the top grid control (works fine), then when selected have the second Grid Control show details for that person(not working). Here is what I am trying from the load event: Sub BindData() Dim myConnection As New MySql.Data.MySqlClient.MySqlConnection(System.Configuration.ConfigurationManager.AppSettings("ConnectionSql")) Dim strPersonSQL, strActSQL As String strPersonSQL = "select row_id, first_name, last_name, middle_initial, dsi_id, created, created_by, program_of_study, email from tbl_person" Dim myPerCommand As New MySqlClient.MySqlComm...

Datagrid(.net 1.1) to GridView(.net 2.0) and using the RowUpdating event how to extract the values from the controls.
Ok  This is the settings: I use a Viewgrid with only itemtemplate colums for example. <asp:TemplateField HeaderText="Test"><ItemTemplate><asp:Label id="LBL_Test" text='<%# DataBinder.Eval(Container.DataItem, "Test1") %>' runat="server" meta:resourcekey="LBL_TestResource1"></asp:Label></font></ItemTemplate> <EditItemTemplate><asp:TextBox ID="HDN_Test" Text='<%# DataBinder.Eval(Container.DataItem, "Test1") %>' Runat="server" meta:resourcekey="HDN_TestResource1" /></EditItemTemplate></asp:TemplateField>  The ...

Simple question
When you first create a .net 2.0 menu component it shows the top level menus but the arrow next to the menu option points to the right instead of pointing down (when making the menu horizontal).. When you branch over it, the sub menus show the arrow pointing to the right as well (image).. this is fine but the top level should point down..   Is there a way to change the top level menu image only and have it point down while the sub menus point to the right?   Thanks in advance for any help you can lend, Todd You can use StaticPopOutImageUrl to set the image you want to use....

How to make align of Menu Control items from Right to Left in .NET 2.0
Hai All I have a problem that on genertaing Dynamic Menu I want menu should generate from Right to Left Dynamic menu flow should have margin as Static Menu items Margin.   please solve my problem. Thank you   If you want the menu to be right-aligned, then you should use text-align: right in your CSS class. Example: <div style="text-align: right"> Short item<br/> A much longer item</br> Perhaps the longest item</br> </div> To get margins, you should use the margin attribute in CSS. Example: <div style="margin: 10px&q...

.Net 2.0 Web application using Vb.net is unable to create object of another dll writen in C# .net 2.0
Hi, I habe created one ASP.net web application using Vb.net which is adding reference of dlls written in C# and .net 2.0. But whenever trying to create object of referencing dll, it is throwing error :Object reference does not set to an object. But, locally it is working fine,. In the server i have deployed the .aspx files and dll files in the bin. There were already an web.config in the server which is of .net 1.1. But checked it is retrieving value for that web.config correctly. Should i have to deply any other files and if not what can be the solution for this? Please help. Thanks, So...

Unable to access page controls from base class in .NET 2.0 Beta 2
Hello All, I have converted a large-ish project to VS2005 beta 2. It is going better than beta 1, but it's still a world of pain. The latest problem is that I can't seem to access page controls from within a base class. I'm sure I didn't get this on beta 1 so maybe something has changed. Or maybe I'm just tired and it'll seem obvious tomorrow (it's the end of the working day here in the UK). Anyway, my problem: I have a page, Administration.aspx, a code behind file Administration.aspx.cs (with an Administration class), and, in a seperate project, a class called AdminPage. ...

Menu navigation in .NET 2.0
Hi all I'm wanting to use the SiteMap menu navigation for .NET 2.0 but want my menu to appear in a different way to the default menu control. Instead of Node   > Sub Node   > Sub Node with popup menus - I want mine to be static, with different sub nodes displaying in different portions of the site. What is the best way to use the .NET Menu control to accomplish this or should it be done in some other way? Thanks as always Shivonne You can set your menu to be either static, or dynamic, or a combination of both (using staticmenulevels and dynami...

Web resources about - Menu control in .net 2.0 - asp.net.navigation-controls

Control - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Now you can control your GoPro Camera from Apple Watch
One of the nicest features of the GoPro camera is the ability to control it using the iPhone app. With the GoPro App , you can easily control ...

Control a car's features with a glance? Not science fiction
Filed under: Emerging Technologies , Infotainment , Technology Press a button to change your car's climate controls? Turn a knob to view your ...

Arizona leaders welcome 'Leave No Child Behind' successor, less federal control
azcentral.com Arizona leaders welcome 'Leave No Child Behind' successor, less federal control azcentral.com The Senate gave final approval ...

FTC and healthcare cost control
... Pennsylvania, and lead to reduced quality and higher health care costs for the area’s employers and residents….the merged entity would control ...

Google seems more determined than ever to take control of Android
... to ad money. However, Google grabbed the lion’s share of the smartphone market by giving Android away. That means it lost the ability to control ...

"... Trump owns and controls the media... they can't not cover him... his audience is bigger than theirs ...
... their army (i.e., the media) can't take out their enemy. They don't have the slightest idea what to do.... The media, in their own minds, controls ...

How to control your iPhone by just tilting your head
... the best sight, hearing, or motor functions to still use iOS to its fullest capabilities — but they can also be used to customize your controls. ...

Fox Presents Ben Stein As An Awesome, Stupendous Gun Control Genius
Fox News host Neil Cavuto was super-impressed with “great writer and thinker” Ben Stein's opposition to gun control. “The problem is not gun ...

White House: We’re Not Going To Wait Until Something Happens To Pass Gun Control
Reporter: 'Where any of the recent mass shooters on the no-fly list?' Earnest: 'Not that I'm aware of'

Resources last updated: 12/11/2015 3:29:53 PM