Web Forms :: Menu Control Dynamically Binding?
Aug 4, 2010I need to bind links from database to menu control in Asp.net how to do it?
View 3 RepliesI need to bind links from database to menu control in Asp.net how to do it?
View 3 RepliesI have a problem with binding a menu control to a sitemap file dynamically.
the files...
[code]
this files are into the 'tesorera' folder in the estructure of my project
When I run the project there aren't errors but I can't see the menu items of the sitemap file, I only see the 'siteMap' word in the menu .... why?
I have placed an aspx menu control on my master page with orientation as Horizontal. Below is HTML markup.
HTML Code:
<asp:Menu ID="mnuMedChem" runat="server" Orientation="Horizontal" Width="100%" OnMenuItemClick="mnuMedChem_MenuItemClick">
<DynamicHoverStyle CssClass="DynamicHover" />
<DynamicMenuItemStyle CssClass="DynamicMenuItem" />
[Code]....
I have tried populating the menus from my database by using the
Code:
mnuMedChem.Items.Add
and
Code:
mnuMedChem.FindControl(value).ChildItems.Add
The menu items and the childs are populating correctly but then the menu is not being displayed on the menu control.
I am using 5 ,6 user control. I wanted to load diffrent user control on Click of menu bar. Means when I click on first link of Menubar 1 user control should load and 2 loaded when i Click on 2 link of menu bar. How to do that?
View 3 RepliesPopulate Menu and SubMenu Dynamically from Database using Repeater control in ASP.Net.
View 1 RepliesI am using Asp.Net web-application. How exactly to create UL menu with ListView control such as :
<ul> <li> <a href="#">Item #1</a> <ul> <li> <a href="#">SubItem #1</a> </li> </ul> </li></ul>
MenuId SubMenuId MenuName MenuUrl
1 0 Home Home.aspx
2 0 Administration Administration.aspx
3 2 Add User AddUser.aspx
4 2 Add Organizaion Add Organizaion.aspx
5 2 Add Program AddProgram.aspx
6 2 Add Activity AddActivity.aspx
7 0 Search Search.aspx
8 0 Utilities Utilities.aspx
9 0 ContactUs Contact.aspx
Is there a way to add/delete/update the default classes (for instance AspNet-Menu-WithChildren,AspNet-Menu-NonLink ) of the html generated by the asp.net menu or treeview control? I am using CSSAdapters so the menu control renders in a list format instead of table format.
View 1 RepliesCurrently I have a menu control on my webform in ASP.Net 4.0 :
<div class="PNMenu">
<asp:SiteMapDataSource ID="PNSiteMap" runat="server" ShowStartingNode="false" />
<asp:Menu ID="PNMainMenu" runat="server" DataSourceID="PNSiteMap" RenderingMode="List" Orientation="Horizontal" CssClass="PN-PrimaryNavMenu" >
</asp:Menu>
</div>
I am trying to style the menu control to allow the menu items to float to the right of the container, however I am unable to do so as whenever I am styling the a, ul or li it keeps getting overidded by asp.net and floats everything left.
.PNMenu
{
clear:both;
[code]...
i have a asp menu in master page and it is populated from database.
i want if user click a link that menu link's background color should change how to do?
What I want is to show menu items Administrator or show user menu items.Show menu items using login...How I can do it with role provider, control menu and siteMap in masterpage?
View 1 RepliesWe have to develop an application which has a Vertical left pane menu control which displays all the web pages (A,B,C say). Now if user is in page A and filled some data and clicks on menu control to go to page B, all the data in page A needs to be saved. Also if all the required field in page A are not filled and user navigated to page B, there will be one ! sign after the menu so that user can understand that there some some more fields need to be filled up.
We are planning to place the menu control in the Mater page. Please give me some direction to do this. My question is:
1. If user change menu (In Master Page), how should we save data?
2. How should we display the ! in the menu control?
I am doing a rework on one of my sites and I am attempting to use the asp:menu control.
I am using images in the static and dynamic menus. Hard coded at this point.
On my local machine it works fine but when I upload to the server, the image on the dynamci menus do not appear.
Instead I just get white space where the images should be.
Here is the code:
[code]
I know that the code depicted below will not work but I am including it to convey the idea of what I wish to accomplish. I want to use a different SiteMap to construct the menu on the displayed page for each of three different classes of service (COS).
I set a session variable named "COS" at the login and want to test its value prior to rendering each page. I want to display a menu based upon the appropriate COS. Here is my first stab at it but I know that I cannot include <asp:...> controls within the "case" statements. Can anyone suggest methods of doing this? I know C# and can use that but I do not know how to select the proper sitemap within the <menu> control. I am also using a CSS in my production version.
[Code]....
Sitemap & Menu:
<asp:SiteMapDataSource ID="Menu" runat="server" ShowStartingNode="false" />
<asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" OnMenuItemDataBound="OnMenuItemDataBound" DataSourceID="Menu" >
<LevelMenuItemStyles>
<asp:MenuItemStyle CssClass="Menu" />
<asp:MenuItemStyle CssClass="Level" />
</LevelMenuItemStyles>
</asp:Menu>
<siteMapNode url="javascript:Logout" title="Logout" description="Logout" roles="*">
<siteMapNode title="Logout" description="Logout"></siteMapNode>
</siteMapNode>
I want OnClick event instead of navigation .
I am using frames in my webpage.in one of the frames i have a menu control whose items are database driven.when click on the menu item, i want another page to be displayed in other frame.
now i want to pass the the selected menu item text to the other page using session variable which is in the menu item click event method.but the thing is when i click on the menu item, the click event is not firing.
is there any better way to pass the selected menu item text to the other page?
I am trying to implement dropline menu using asp.net menu control. I found JQuery dropline code @ Dynamic Drive & currently using CssFriendly Adapters to get neet CSS, but i am unable to implement it as menu control renders its own css names.
View 1 RepliesI am working with asp.net 2.0 I have 1 problem Regarding Menu Control I used menu control in Master page. Now I have to find out Menu Item from Menu control depending on Condition. how to do that on server and Client side.
My code:
<asp:Menu runat="server" Orientation="Horizontal">
<StaticMenuItemStyle CssClass="jobTabNormal" />
<StaticSelectedStyle CssClass="jobTabSelected" />
<DynamicHoverStyle CssClass="jobTabHover" Font-Bold="true" />
<DynamicMenuStyle />
<DynamicSelectedStyle CssClass="jobTabDynamicSelected" />
<Items>
<asp:MenuItem Text="Job Details" Selected="true" NavigateUrl="#" Enabled="true">
</asp:MenuItem>
<asp:MenuItem Text="Cargos" Enabled="false" NavigateUrl="~/Pages/cargoDetails.aspx">
</asp:MenuItem>.......
how to align the menu bar with proper space
View 1 RepliesHow to use pop up menu (instant of Menu control)? can you give me some instruction.
View 2 RepliesI have a 3 layer aps.net application (DAL, BLL,PL)
I wanted to create a horizantal menu and then to populate/enable/disable the items of the menu depending on the user has permision of a specific form/page or not.
The backend/ data base work is complete. I give rights to a user/role on a specific page and I
also develope functions/procedures to check the user rights/retrieve all pages on which the user has rights.
The missing part is the front end, How I can implement this on the front end?
If I got some standard way, I will immplement it in all my future asp.net apps, As most of our apps have some menu and we want to display mentu items to the user depneding on the rights.
I may want to clear one thing here that I want a horizantal menu but there is no horizantal menu in aps.net tree view.
I have a menue which is being generated from a DB table by help of the following XSLT :
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" encoding="utf-8"/>
[Code]....
1. When executed I have a "Add Building" and "Click here to add tower" on the page.
2. When clicked on "Add Building" a editable gridview appears when I enter the text and say update.
3. When I click on "Click here to add tower" another button "Add Tower" is displayed on the
page.
4. On this "Click here to add tower" event I have called the usercontrol, where the usercontrol has a editable gridview and a button called "Add Tower".
5. When I click on "Add Tower" a editable gridview should be displayed but the editable gridview is not displayed ,it disappears.
6. Postback is happening ,so I am not getting where and how to handle the postback and even the viewstate
[code]....
i wanna creating a gallery in my website by using datalist,
but i getting images statistically,
i wana get it dynamically,
I have the following Menu:
[Code]....
[Code]....
It's being loaded from a dynamically generated XmlDataSource Item:
[Code]....
The XML of which looks something like this:
[Code]....
I can't seem to figure out a way to make the width of the drop menus consistent (they're following the padding conventions I have outlined, I get that). What I'm interested in is a way to make the DynamicItemsStyle width on all items the width of the widest one.
I have a menu of products which are created at runtime from the database and populated into menu control.
But i need to also create a sitemap and display when the relevant menu or submenu item is selected