Web Forms :: How To Connect Menu Control With Database
Mar 13, 2010How to i connect Asp.net menu Control with Database?
means i update the database menu is automatically updated
How to i connect Asp.net menu Control with Database?
means i update the database menu is automatically updated
I need a sample which connects a control to database with Ajax and vb.code.Most of the examples are in C#.I need one Ajax script and the web service code has to be with visual basic.
View 1 Replieshow i can connect sql database to table control?
View 1 RepliesActually m developing a simple website, where I am using ASP.Net Login control and now I want to connect it the database where I am accepting somewhat same kinda information one and one of my field specifies the type of the role that particular person would be playing. So, how would i connect the authenticate through my database's table?
View 7 RepliesIn classic ASP I would write some logic to get a nice menu on the site, but now with the Menu-control, it's as easy as it gets.. Maybe to easy. I can't quite figure out how I would do this.. I have a multilevel navigation structure (from a database) that I want to put into the Menu-control, but I don't know which approach is the best/easiest way for me..
I'm all into performance, usability and all that.. The only thing I have really decided is that I want to use the Menu-control, I haven't decided what datasource I should use or how to style the individual links my way The data is coming from a database and is not supposed to be changed very often (maybe once or twice every month).. Thought of making an XML-sitemap, but also of making some sort of SQL-hookup.. I'm leaning towards the XML-sitemap because it wouldn't take long to generate the XML every time the navigation changes and that won't happen very often. The next issue is styling, how to do that? I have the neccesary css ready for the individual links, but I'm still unsure of how to get it to the Menu-control.. The css I have looks like below and in its current form is intended just for the anchors
[Code]....
how to connect a datatable to menu item?is is possible by Eval method or anything?
View 2 Replieshow o create menue and sub menue from data base?
View 1 RepliesIn this article [URL] ....
I am receiving "Object reference not set to an instance of an object" error. It pops up in line :
Menu1.Items.Add(menuItem) in method called "PopulateMenu"
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?
is there is any control in asp.net to mange for creating menu using database and mange when it's click link it open in iframe
View 1 RepliesI 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?
Populate Menu and SubMenu Dynamically from Database using Repeater control in ASP.Net.
View 1 RepliesI 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 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
How to use pop up menu (instant of Menu control)? can you give me some instruction.
View 2 Repliesim trying to connect a loginname to a data base so when ever a button is pressed the name in the loginname is inserted into the database i tried this code but didnt work :
[Code]....
how can i do that