MVC :: Navigation Menu / How To Built <UL><LI> Menu From The Db

Aug 19, 2010

I've buit a menu functionallity in my MVC app where you can add/remove and modify navigation items:

this is what it looks like in the database (the key thing to notice here is URL field where i'm storing all Area/Controller/Action/Param values.

Now, on the front end I would like to built <UL><LI> menu from the db.

How would I know what page I'm on so that I can add class "current" to <li>. If for example I'm in "http://localhost/Admin/Admins/Dashboard" how would i know it applies to /Admin/Dashboard AND /Admin/Dashboard/Index?

-another thing. how would i handle params. For example when I'm on page /Admins/ContactUs/Edit/32 - how would i match this to /Admin/ContactUs/Edit/ ?

View 1 Replies


Similar Messages:

Web Forms :: How To Work With Navigation Menu And Assign Pages In Navigation Menu In Master Page

Aug 25, 2010

Iam using masterpage and i want to use navigation menu ,but i don't want to use sitemap concept

how to work with navigation menu and assign the pages in navigation menu in master page

View 2 Replies

Web Forms :: Navigation Menu / Login And Add Some Buttons To Navigation Menu

May 19, 2010

I'm developing a Portal to a school

I need to login (ok)

I also need when the login is ok, to add some buttons to navigation menu, taht is created in the Master Page.

Is it possible?, how?

i already handle the page load on the default page.

View 3 Replies

VS 2008 - Menu Navigation Control - Spacing Between Menu Items

Jul 10, 2010

I added a menu avigation control in my page and i did this:

<div style="background-color: Maroon">
<asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" ForeColor="Black" Font-Bold="true"
BackColor="Chocolate">
<Items>
<asp:MenuItem Text="Home"></asp:MenuItem>
<asp:MenuItem Text="About Us"></asp:MenuItem>
<asp:MenuItem Text="Services"></asp:MenuItem>
<asp:MenuItem Text="Careers"></asp:MenuItem>
<asp:MenuItem Text="Contact Us"></asp:MenuItem>
</Items>
</asp:Menu>
</div>

but i cant give proper spacing between the menu items right now it is appearing like this: how to give proper spacing between the menu items them?

View 14 Replies

Web Forms :: Menu And Menu Items For Navigation?

Jun 16, 2010

I'm using asp.net and css to style a master page with navigation at the top. I was hoping to add the login status control in as a menu item but it is not allowed. Can someone point me in the right direction? When I post my code on this forum do I have to include tags?

View 4 Replies

Navigation Menu Like Thegatesnotes.com?

Jan 27, 2010

Anyone know how to create a menu like the thegatesnotes.com ? Can we custamize the treeview control like that?

View 1 Replies

Navigation Menu Not Aligned

Jan 11, 2011

I am putting a navigation menu with in a div but the menu in aligned correctly. I want it to aling to top but it is being placed at the bottom.

Here is the script:

<%@ Master Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>Super Dream Mattress Co. </title>
<meta name="description" content="Super Dream Mattress Co. - Scorland only Memory Foam Mattress Manufacturer. We Manufacture Foam Toppers, Double Mattresses, Single Mattresses and Kingsize Mattresses. Free next day delivery on items, contact us online or call
0141 810 4333" />
<meta name="keywords" content="memory foam mattresses, memory foam toppers, memory foam double mattress, memory mattress, memory foam mattresses, Super Dream Mattress Co, Superdreammattressco" />
<script type="text/javascript" src="script.js"></script>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
<!--[if IE 6]><link rel="stylesheet" href="style.ie6.css" type="text/css" media="screen" /><![endif]-->
<!--[if IE 7]><link rel="stylesheet" href="style.ie7.css" type="text/css" media="screen" /><![endif]-->
<style type="text/css">
.newStyle1
{
font-family: Arial, Helvetica, sans-serif;
font-size: medium;
}
</style>
</head>
<body>
<div id="art-page-background-simple-gradient">
</div>
<form id="form1" runat="server">
<div id="art-main">
<div class="art-Sheet">
<div class="art-Sheet-tl">
</div>
<div class="art-Sheet-tr">
</div>
<div class="art-Sheet-bl">
</div>
<div class="art-Sheet-br">
</div>
<div class="art-Sheet-tc">
</div>
<div class="art-Sheet-bc">
</div>
<div class="art-Sheet-cl">
</div>
<div class="art-Sheet-cr">
</div>
<div class="art-Sheet-cc">
</div>
<div class="art-Sheet-body">
<div class="art-Header">
<div class="art-Header-png">
</div>
<div class="art-Header-jpeg">
</div>
<div class="art-Logo">
<h1 id="name-text" class="art-Logo-name">
<a href="~/Default.aspx">
Super Dream Mattress Co.</a></h1>
<div id="slogan-text" class="art-Logo-text">
Dreams in Comfort</div>
</div>
</div>
<div class="art-contentLayout">
<div class="art-sidebar1">
<div class="art-Block">
<div class="art-Block-body">
<div class="art-BlockHeader">
<div class="l">
</div>
<div class="r">
</div>
<div class="art-header-tag-icon">
<div class="t" >
Menu</div>
</div>
</div>
<div class="art-BlockContent"
<div class="art-BlockContent-body">
<div class="cleared" >
<asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1"
StaticDisplayLevels="3" valign="top">
<StaticMenuItemStyle VerticalPadding="0px" />
</asp:Menu>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
</div>
</div>
</div>
<div class="cleared">
</div>
</div>
</div>
<div class="art-Block">
<div class="art-Block-body">
<div class="art-BlockHeader">
<div class="l">
</div>
<div class="r">
</div>
<div class="art-he
<div class="t">
Highlights</div>
</div>
</div>
<div class="art-BlockContent">
<div class="art-BlockContent-body">
<div>
<p>
Super Dream Mattress Co. become members of the National Bed Federation.</p>
<p>
<img alt="Super Dream Mattress Co. become member of the NBF" class="style2"
src="images/nbf_logo.gif" align="middle"
style="z-index: auto" /></p>
<p>
<br />
</p>
</div>
</div>
</div>
</div>
</div>
<div class="art-Block">
<div class="art-Block-body">
<div class="art-BlockHeader">
<div class="l">
</div>
<div class="r">
</div>
<div class="art-header-tag-icon">
<div class="t">
Contact Info</div>
</div>
</div
<div class="art-BlockContent">
<div class="art-BlockContent-body">
<div>
<img alt="an image"
src="images/contact.jpg"
style="margin: 0pt auto; display: block; width: 95%;" />
<br />
<b>SuperDream Mattress Co.</b><br />
Unit 3a Pegasus Business Park<br />
Hillington, Glasgow<br />
Scotland, G52 4TY<br />
Email: <a href="mailto:sales@kayfoam.co.uk">sales@kayfoam.co.uk</a><br />
<br />
Phone: 0141 810 4333<br />
Fax: 0141 810 1423
</div>
<div class="cleared">
</div>
</div>
</div>
<div class="cleared">
</div>
</div>
</div>
</div>
<div class="art-content">
<div class="art-content">
<div class="art-Post-body">
<div class="art-Post-inner">
<asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server">
</asp:ContentPlaceHolder>
</div>
</div>
</div>
</div>
</div>
<div class="cleared"
</div>
<div class="art-Footer">
<div class="art-Footer-inner">
<a class="art-rss-tag-icon"
title="RSS"></a
<div class="art-Footer-text">
<p>
Contact Us</a> |
Terms of Use</a
Trademarks</a> |
Privacy Statement</a><br />
Copyright © 2011 ---. All Rights Reserved.</p>
</div>
</div>
<div class="art-Footer-background">
</div>
</div>
<div class="cleared
</div>
</div>
</div>
<div class="cleared">
</div>
<p class="art-page-footer">
Kayfoam</p>
</div>
<div>
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>

View 2 Replies

Web Forms :: Alignment In Navigation Menu

Jan 16, 2010

[Code]....

I want to be able to make the first line blank, in this case "about us" and still keep the same dyamtic alignment on my nav menu. Right now, if i take the "about us" title text out, it messy up my dyamtic or on hover nav menu. What would be best is i can replace those letters with spaces but it won't work with just blanks. Any idea on how i would not display the "about us" but keep everything as is?

View 5 Replies

Web Forms :: How To Make Navigation Menu

Jul 11, 2010

I'd like to make navigation menu like one in [url=http://www.eveonline.com/]here[/url]. I thought about using TreeView, but I couldn't make "collapse" indicators to disapear. If I set ShowExpandCollapse property to "false" those indicators disapear, but tree becomes expanded and static. That's not what I want to achieve.

View 2 Replies

Web Forms :: Logout At Navigation Menu

Nov 9, 2013

How can I add a logout link to my navigation menu. I have horizontal dropdown menu.

View 1 Replies

Master Page Basically Contains A Menu Built Using HTML Table

Feb 13, 2012

I have a situation where I'm using a single Masterpage and two Content Pages. The Master page basically contains a menu built using an HTML Table. The one Content Page contains the marjority of my site content. The way the menu works is that when user selects a menu item, a javascript function executes that evaulates which menu item was selected.

Now, this is where I'm not sure what to do next. Should I load the next Content Page in this javascript function or somewhere in the CodeBehind of the Content Page? I'm trying to find examples where I can load a page using Javascript but not having any luck.

View 20 Replies

Webpage Menu / Navigation System Recommendation?

Feb 1, 2011

Im a newbie working on my first ASP.NET webpage using Visual Studio 2010. Im looking for a recomandation on a flexible webpage navigation/menu system. I need a dynamic system that uses SQL as backend (so that webmaster can update menus/navigation using a simple CMS) Any good systems out there you would recomend?

View 3 Replies

Web Forms :: 2010 To 2008 Navigation Menu

Sep 23, 2010

played w/ visual web developer 2010 and liked the template that i was given by creating a new project using the "asp.net web application visual basic" However my company is using visual studio 2008 and we are not upgrading anytime soon. So i'm trying to remake that template in visual web developer 2008. I've got 90% of it transfered and working, the styles and master.site and all work, except the menu. It's like the CSS isn't carying over right, the drop downs work on mouse over but I don't have the nice puffy buttons that change background color when i mouse over. I've dug though the css and asp code and can't find anything thats not linking up. Does anyone have any idea how to get this last 10% figured out?

<div class="clear hideSkiplink">
<asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal">
<Items>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Home"/>
<asp:MenuItem Text="Obituaries" Value="Obituaries">
<asp:MenuItem Text="Recent" Value="Recent"></asp:MenuItem>

View 2 Replies

Web Forms :: Navigation Menu Disappears From Page

Nov 14, 2010

I am having a problem with my menu. My navigation menu gets created with data from different tables in a database. When the page loads after a few minutes the navigation menu disappears from page. Does anyone have had this problem or knows how to fix it?

View 3 Replies

Web Forms :: Navigation In Menu Control Browser IE7?

Feb 28, 2010

I am a student and .net freshers.I have been working on a website using asp.net and has used menu control in it.it has various sections like home,about us ,customer care and i have set navigate url for each menu parts and submenus .but it is not navigating to respective pages while it is opened in browser. I have seen sitemap usage and iE8 compatiblity articles does it needs to be done ...cant it workout just by setting navigate url in property of menu?

View 6 Replies

Menu Navigation Bar With Dropdown Visible To False?

Mar 22, 2011

I have a menu navigation bar with drop down menu in asp.net project.i have done this with jquery.To get into this page i have 5 hyperlinks in previous page. when i click on one of the hyperlink and enter the navigation bar page,i need to make dropdown visible to false. i dont have any idea related to this.

View 1 Replies

Web Forms :: Navigation Menu Horitzontal Orientation?

Feb 7, 2011

Site developed in VS2010, using Framework 4. I upgraded from a VS 2005, Framework 2.I have a master page with a Navigation Menu set to Horizontal Orientation. When most of the pages on my site are renders, the Nav Menu briefly displays as Vertical before displaying as Horizontal. It ususally takes less than a second, but looks ugly from a user stand point. Anyone else run into (and fix) something like this?

[Code]....

View 4 Replies

Web Forms :: Page Navigation And Menu Using IFrame

May 20, 2013

How to achieve the below using frames in asp.net?

[URL] ....

The menu in the navigation bar is static.

View 1 Replies

Visual Studio 2008 Generate Top Navigation Menu?

Dec 21, 2010

I came across this site and like the top nav menu [URL] can visual studio 2008 generate such a menu like that. Moreover, what about if I want to apply security on what to show in the menu. For instance, I will have 3 departments ( Finance, Accounting and Marketing ) each department has its own apsx page. Depending on role, I need to show / not show a page under each department. How can I enforce such thing.

View 1 Replies

Web Forms :: Navigation Menu Control Horizontal - Multiline?

Jan 7, 2010

I've built a website with a Horizontal Menubar at the the top of the site, it works fine the only problem is now that i have added more items to the website map it has now grown wider than the site, so what i would like it to do is when it gets to a certain width drop down and start adding the node links underneath. i tried setting the width property of the <asp:menu> but this did not seem to do anything at all. I could obviously add a second menubar linking to another sitemap but i would like to be as dynamic as posssible. Plus the menu is baseed around the role structure so some users may only see 5 items where admins, supervisors etc may see around 30 level 1 menu items with multiple subitems. so in short how to i make the menu wrap round to the next line when a certain length is reached

View 3 Replies

Web Development - Looking For Navigation Menu Editor With Source Code

Jan 3, 2010

web-based so it can be used by users and hopefully using the class SQLSiteMapProvider which allows for saving sitemap in a SQL Database instead of XML.

View 1 Replies

AJAX :: Accordion Control For Left Navigation Menu?

Feb 23, 2010

i want to implement an accordion control to the left navigation menu. The Main title on left menu called Activities is standard so i have hard coded it. The subtitles I want to pull from the database , from the stored procedure "Activity_Get". however i am not able to achieve this because I get an error "DataSource 'sds2 ' for control 'accActivities' doesn't exist". The following is the aspx code.

<div>
<asp:ScriptManager
ID="asm"
runat="server"
/>
<div>
<table
cellpadding="0"
cellspacing="0"
width="100%"><tr>
<td
class="highlightstitle"
style="width:180px;height:500px"
valign="top">
<aj1:Accordion
ID="accLeftMenu"
runat="server"
SelectedIndex="-1"
HeaderCssClass="navlink3" HeaderSelectedCssClass="navlink2"
ContentCssClass="subnav"
AutoSize="None"
FadeTransitions="true" TransitionDuration="250"
FramesPerSecond="40"
RequireOpenedPane="false"
SuppressHeaderPostbacks="true">
<Panes>
<aj1:AccordionPane
ID="acpEdu"
runat="server"
>
<Header>...........

View 3 Replies

Web Forms :: Disable ToolTip On Asp - Menu Navigation Control?

May 26, 2010

How to get rid-off ToolTip showing when people hover over menu items in asp:menu navigation control? The ToolTip itself covers pop-out sub-menu and very irritating. ToolTip actually displays "description" from Web.sitemap. I thought to delete "description", but that would be nice to have for asp:SiteMapPath.

View 2 Replies

C# - MVC Can Create Dynamic Navigation Sub-menu On The Master Page?

May 16, 2010

I'm trying to create an ASP.NET MVC master page so the site navigation on it will look like this:

Main Menu:Home | About | News
Sub Menu: Home_Page1 | Home_Page2

The Sub Menu section should always show sub-menu for the currently selected Main Menu page (on the example above 'Home' page is selected) unless a user hovers the mouse on another Main Menu item (then it shows that item's sub-menu instead).

View 2 Replies

Web Forms :: Navigation Menu With Current Page Highlighted?

Jan 15, 2010

Im building a navigation and want to display the current page (Default.aspx, OtherPage.aspx) the user is on with a class.Right now I just have a bunch of links as <a> tags.Here is a my menu:

[Code]....

As you can see the Default.aspx has the class active, but that is just something I put in.How do I do this dynamically?I know I can use Path.GetFileName(Request.FilePath) to get what page the user is on.

View 3 Replies







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