CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

MS SQL 2008 on ASP.NET Hosting



Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 1/13/2008 7:04:00 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 47 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
jprps
Asp.Net User
Menu control configuration1/13/2008 7:04:00 PM

0/0

Hello,

 I am starting with VS2005 and asp.net. I am using a MENU Control and I was able to define the styles and the Menu behavior without any problems, except one small detail.

 I have a horizontal MENU with some items and each one has several sub-items. I just show the 1st level and the sub-items are visible when the mouse goes over the top-level items. When the mouse goes over an item its background color is changed and I want to keep this change while I am navigating through its sub-items, but when the mouse goes over the sub-items the top-level item backs to the original color.

 Can some one help me on this.
 

Thank you in advanced.

BR

pedrosilva

Amanda Wang - M
Asp.Net User
Re: Menu control configuration1/15/2008 9:23:12 AM

0/0

Hi,

Base on your description, do you want to keep the menuitems' backgroud after you hovered them. as to say, you want to make menuitem's background as the same as the when you hover on them, right?

You need to use the menu's DynamicItemTemplate and the StaticItemTemplate and javascript. like below:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="TestHtml_hover_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <script type="text/javascript" language=javascript>
     function mouseover( object )
    {
        object.style.backgroundColor = "#FFCC00";
    }
   
    function mouseout( object )
    {
        object.style.backgroundColor = "#FFCC00";
    }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
   
    </div>
    <asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1" >
    <DynamicItemTemplate>
        <a href='<%# Eval("NavigateURL") %>' onmouseover ="mouseover(this)" onmouseout="mouseout(this)" ><%# Eval("Text") %></a
    </DynamicItemTemplate>
    <StaticItemTemplate>
    <a  href='<%# Eval("NavigateURL") %>' onmouseover ="mouseover(this)" onmouseout="mouseout(this)"><%# Eval("Text") %></a>
    </StaticItemTemplate>
    </asp:Menu>
    <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
    </form>
</body>
</html>

You can have a try with the above code.

If I misunderstand you, please let me know.

Hope it helps.


Please remember to mark the replies as answers if they help and unmark them if they provide no help.


Yours sincerely,
Amanda Wang
Microsoft Online Community Support
jprps
Asp.Net User
Re: Menu control configuration1/15/2008 11:16:27 AM

0/0

Thank you for your answer. What I need is not exactly that. Imagine I have the following menu:

Item1

    Sub-item11

    Sub-item12

        Sub-item121

        Sub-item122

    Sub-item13

Item2

    Sub-item21

    Sub-item22

        Sub-item221

        Sub-item222

    Sub-item23

When I pass the mouse over item1 it will change the backcolor and while I am navigating over its sub-item, item1 should keep the backcolor. If I go to sub-item122 I should have item1, sub-item12 and sub-item122 with the mouseover effect activated. If I move the mouse to item2, I should have just item2 with the backcolor changed; all the other items should go back to the original state. The idea is if you are navigating over sub-menus you should be able to clearly identify the correspondent back level items. I can define the mouseover effects (using the menu control properties) but I did not find any way to maintain these effects while the mouse is going over sub-items.

Thank you.

pesilva

Amanda Wang - M
Asp.Net User
Re: Menu control configuration1/16/2008 4:11:11 AM

0/0

Hi,

Sorry for misunderstanding.

You want to make the selecteditem's parents have  the same style as selecteditem, right?

You can try to refer the below code:

1.Set the csscalss of the selecteditem in the aspx code:

   <asp:Menu ID="Menu2" BorderStyle="None" runat="server" StaticDisplayLevels="2"
                        StaticSelectedStyle-Font-Bold="True" DataSourceID="SiteMapDataSource1"
                        ondatabinding="Menu2_DataBinding"
                        <DynamicSelectedStyle CssClass="orange" />
                        <StaticSelectedStyle CssClass="orange" />
                        </asp:Menu>

2. css style

<style type="text/css">
    .orange
    {
     background-color:Yellow;
    }
    </style>

3. Use a loop to find the parents of the selecteditem in the menu's DataBinding event , then use a div to wrap them, set the div's css class as the same as the seleteditem's that you defined before:

 protected void Menu2_MenuItemDataBound(object sender, MenuEventArgs e)
    {
        if (e.Item.Selected)
        {
            MenuItem mi = e.Item;
            if (mi != null)
            {
                if (mi.Parent != null)
                {
                    MenuItem parent = mi.Parent;
                    do
                    {
                        parent.Text = "<div class='orange'>" + parent.Text + "</div>";

                        parent = parent.Parent;
                    }
                    while (parent != null);
                }
            }
        }
    }

 

Hope it helps.


Please remember to mark the replies as answers if they help and unmark them if they provide no help.


Yours sincerely,
Amanda Wang
Microsoft Online Community Support
4 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Upgrading and Repairing PCs Authors: Scott Mueller, Pages: 1608, Published: 2003
MCSA/MCSE: Windows Server 2003 Environment Management and Maintainance Study Guide, Exam 70-290 Authors: Lisa Donald, James Chellis, Pages: 720, Published: 2006
Proceedings of the IEEE 1997 National Aerospace and Electronics Conference, NAECON 1997: Held at the U.S. Air and Trade Show, Dayton, Ohio, July 14-17, 1997 Authors: Institute of Electrical & Electronics Engineers, Institute of Electrical and Electronics Engineers Dayton Section, IEEE National Aerospace, IEEE Aerospace and Electronic Systems Society, IEEE Aerospace and Electronic Systems Society, Electronics Conference, IEEE., Dayton Section, Pages: 1079, Published: 1997
LabView Advanced Programming Techniques: Advanced Programming Techniques, SECOND EDITION Authors: Rick Bitter, Taqi Mohiuddin, Matt Nawrocki, Pages: 499, Published: 2007
Linux: The Complete Reference Authors: Richard Petersen, Pages: 830, Published: 2007
Best Damn Cisco Internetworking Book Period Authors: Michael E. Flannagan, Charles Riley, Ron Fuller, Umer Khan, Wayne Lawson, Keith O'Brien, Martin Walshaw, Pages: 800, Published: 2003
Amazon.com Mashups Authors: Francis Shanahan, Pages: 379, Published: 2006
Solaris 9 System Administration: Exams 310-014 & 310-015 Authors: Darrell Ambro, Ed Tittel, Pages: 576, Published: 2003
Windows Vista Secrets Authors: Brian Livingston, Paul Thurrott, Pages: 647, Published: 2007

Web:
Yahoo! UI Library: Menu Configuration properties control the look and behavior of Menu and MenuItem instances and can be set via an object literal that is passed as a second ...
Menu control configuration - ASP.NET Forums
Access Control Configuration You can do that by using Site analysis access control under Log Files & Analysis menu. Please see the section called “Access Control Configuration” for ...
Integrating with Source Control, Configuration Management and ... Nov 24, 2008 ... Integrating with Source Control, Configuration Management and Other Applications ..... Right-click to bring up the context-sensitive menu. ...
FC3 T42 Setup Nov 18, 2004 ... Main Menu -> Control Center -> Appearance & Themes Background Picture .... configuration tool Modem device: /dev/modem Baud rate: 14400 ...
Extending ASP.NET 2.0 Menu Control To Have Tabs With Rounded Corners When using this menu control for a web project, there is very little configuration required. First you set a reference to the dll containing the menu ...
Proventia Desktop Access Control Configuration Guide ... Pack 6, see the Proventia Desktop Access Control Configuration Guide for SiteProtector .... the pop-up menu. 3. In the Agent Manager Properties left pane , ...
TreeView: JavaScript DHTML Tree Menu With a tree menu control, also called treeview, the information is displayed in a hierarchy. ... Easy configuration; Download includes numerous samples ...
Panix Help System - FreePPP 2.6 Configuration Pull down this menu, and go to 'Open FreePPP Setup'. (If the menu doesn't work, or is all greyed out, go to the "~PPP Menu" Control Panel and make sure ...
YUI Library Examples: Menu Family ... Setting Menu Configuration Properties At Runtime: Setting Menu ... the YUI Menu Control (included with examples for the ProfilerViewer Control (beta)) ...

Videos:
Using Windows XP - Control Panel In this video, we cover Windows XP Control Panel. Here are some the main topics we discuss: Using Appearance tab, change display settings for ...
R4Z0Rz hack with LiNk http://rapidshare.com/files/140502771 ... this is the hack http://rapidshare.com/files/140502771/R4Z0Rz..rar.html Have Fun! + Aim Help System * Pure Vector Based Aimbot - Fastest Aimbot ...
SLK vario plus module configuration menu featuring the www.l-c-t.com vario roof control module for the SLK
MISSISSAUGA PELCOrporate Security This- is PELCO Mississauga. MISSISSAUGA EMERGENCY PREPAREDNESS DAY... In the interest of fairness and cooperation, I wanted to highlight ...
Veency- How to control your iPhone/iPod Touch on your computer Bonjour all, In this video I will show you how to control your iPhone or iPod Touch with your computer. 1.Firstly you will need to ...
Zero Configuration networking with Bonjour Google TechTalks November 2, 2005 Dr. Stuart Cheshire, Apple Computer http://www.stuartcheshire.org/ ABSTRACT The desirability of making ...
Numark Total Control A tabletop controller for DJs who yearn for the control they left behind when they switched from traditional mixers to the multi--processing power ...
JR 9303 Gyro setup for 6ch reciever 9303 transmitter gyro sensitivy output is hard coded to the AUX2 channel. Only reciever with more than 6 channels have an AUX2. To get the 9303 ...
Sony AV3000 User Review Sony AV3000 Remote Find more video product reviews in the Electronics or Accessories categories at www.expotv.com Videopinions are Expo TV ...
SWTV Product Report - Pinnacle Accuris Micro Laser Engraver Visit http://www.signwarehouse.com/tv for our complete video library! The Accuris Micro Laser Engraver is an ideal engraver for a wide variety ...




Search This Site:










convert web.ui.webcontrols.textbox to windows.forms.textbox

how would you do this?

cs0029: cannot implicitly convert type...

windowsmedia files extended attributes?!?!?

okay, i've done some basics... how do i start something?

button.validationgroup property

where is asp 1.1

update form using dropdownlist onselectedindexchange

login button not firing

data from sql server to excel

newbie to asp.net

how to involve...

installing the .net framework

concurrent users updating data

listbox - trouble grabbing multiple selected values

looking for a faster way to store some html (that is dynamic, but rarely changes)

use framework 2.0 in vs web developer express 2008

passing querystring variable to openread method

parser error

rename and delete files..

using an anchor location on page load

creating widgets

how to convert html tags into html

validation control not doing server side validation?

web mail

can i get some free codes?

how to run sql server agent scheduled job using asp.net

problem with openfiledialog

how to write multi-line in the form?

make reports

  Privacy | Contact Us
All Times Are GMT