Forms Data Controls :: Fill Menu Items From Database ?
Nov 25, 2010I have menu list like this
and I want to fill it's Items from my SQL database, is that possible ?
I have menu list like this
and I want to fill it's Items from my SQL database, is that possible ?
i have created menus using menucontrol (populated using database) its showing me menu items properly.now menu items goes out of screen (viewing area of the screen)i want to wrap that menu items means if the menu items goes out of the screen it will automatically shows the remaining menu items to the next line... and i have taken menucontrol in span tag..
View 2 RepliesI hv created menu using sitemap xmldatasource now i want to display that based on Category or Roles. I have Created 4 Category in my sql Server 2005. when particular user logged in based on his Category menu nodes should display.
View 7 RepliesI want to build a menu something like shown in the below url.
I need to load the menu items from the DataBase....
Dynamically i want to change it.... Any possiblities...?
[URL]
or any other way to have an accordionmenu from the database...
i am created a user control(.ascx)
<span><asp:DropDownList ID="Drop_DocType" runat="server" DataTextField="DOCTYPE"DataValueField="DOCTYPE"/></span>
how to fill it rom database and where i put soure code
Currently 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]...
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 Repliesi'm working with asp.net visual studio 2008 c#i'm using Menu and i added items . the first item has like sub-items ...now when i run the website, the Menu wont open the sub-items menu ... this is the code :
<li style="direction: rtl"> <asp:Menu ID="Menu2" runat="server" BackColor="WhiteSmoke" BorderColor="White" ForeColor="#6699FF" Font-Bold="True" Height="361px" Style="left: 2px; position: relative; top: -9px; background-color: #ffffff" Width="194px"> <Items> <asp:MenuItem
NavigateUrl="~/CourseSignUp.aspx" Text="ืงืืจืกื ืืืืฉื" Value="ืงืืจืกื ืืืืฉื"> <asp:MenuItem Text="ืงืืจืก ืืืืื ืขื ืืื 18" Value="ืงืืจืก ืืืืื ืขื ืืื 18"> <asp:MenuItem Text="ืงืืจืกืื ืืงืืฅ" Value="ืงืืจืกืื ืืงืืฅ" NavigateUrl="~/CourseSignUp.aspx"></asp:MenuItem> <asp:MenuItem Text="ืงืืจืก ืืื ืฉืืฉื" Value="ืงืืจืก ืืื ืฉืืฉื"></asp:MenuItem> <asp:MenuItem Text="ืงืืจืกืื ืืืืื" Value="ืงืืจืกืื ืืืืื"></asp:MenuItem> </asp:MenuItem> <asp:MenuItem Text="ืงืืจืก ืืืืืจืื" Value="ืงืืจืก ืืืืืจืื"> <asp:MenuItem Text="ืงืืจืก ืืื ืฉืืฉื" Value="ืงืืจืก ืืื ืฉืืฉื"></asp:MenuItem> </asp:MenuItem> </asp:MenuItem> <asp:MenuItem Text="ืฉืืขืืจืื ืคืจืืืื" Value="New Item"> </asp:MenuItem> <asp:MenuItem NavigateUrl="~/Rents.aspx" Text="ืืฉืืจืืช" Value="Rents"></asp:MenuItem> <asp:MenuItem Text="ืืืืข ืืืืืฉ ืืืชืืื" Value="New Item"></asp:MenuItem> <asp:MenuItem Text="ืืื ืงืื" Value="New Item"></asp:MenuItem> <asp:MenuItem Text="ืชืืืืืช" Value="New Item" NavigateUrl="~/Forecasts.aspx"></asp:MenuItem> <asp:MenuItem Text="ืืืืจืื" Value="New Item"></asp:MenuItem> <asp:MenuItem Text="ืืกืืืจืืช ืืืืฉื" Value="New Item"></asp:MenuItem> </Items> </asp:Menu> </li>
how to align the menu bar with proper space
View 1 RepliesI have a database where a user inputs data to multiple databound drop down listboxes. That's saved to my aspnet database. Then when the page loads again, I want to select the ddls items that the user selected as stored in the database to these databound ddls. But it doesn't work, because on pageload, they haven't been databound yet.
What's the best way to do this? Do I need to run a SELECT statement for each and every ddl on it's databound event?
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 RepliesI want to populate data from database and display it to dropdownlist.
View 3 RepliesI have stored checkbox items in the database where Yes = "1" and No = "0".
If I want to retrieve them again (from database) as checkbox items on a page, how do I go about this?
how to add listbox items to database ..all items without selecting any particular...
View 1 RepliesPopulating CheckBoxList from a column of a table.
View 1 RepliesI 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 unable to create dynamic menu from database. I have made two tables for this work.First table is Menu which stores menu id and its relevant name.
MId Text
------------
1 File
2 Edit
3 View
..
..
Second table is subMenu which stores submenus which will be linked to the menu table with menu id.
SId Text MID
-------------------
1 New 1
2 Open 1
3 Save 1
4 Cut 2
5 Copy 2
the menu should be created dynamically from the database, each menu should be displayed in single row
when we click on a menu the submenus are displayed in rows that in expand & contrast form
how to design & develope this page
I need a help in creating a vertical oriented Menu control with dynamic url's set in there Navigate Url property.Also i need to set the menu items as enable/disable in two different modes say edit/new.
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?
I'm trying to create an asp menu for a website. The site will have 2 levels of user Master users (which will have more options) and Sub users which will have limited menu options.
I was wonder does anyone knows if a way to hide menu items? I've tried google but I can't really find much.
Here's the Asp code
[Code]....
I have worked out how to hide the whole menu when the user is not logged in
MainMenu.Visible = false
I am making a login page in asp.net. when am trying to fill the data into the database it can give the error..."Incorrect syntax near 'Password'." my code is
SqlConnection sqlConnection = new SqlConnection("Data Source = DELLVOSTRO; Initial Catalog = ALPHA; User Id= sa; Password= intransit");
string queryString = ("INSERT INTO LOGIN(User_Id, Password, Confirm Password, E_Mail, Security_Question, Security_Answer) VALUES ('" + CreateUserWizard1.UserName + "','" + CreateUserWizard1.Password + "','" + CreateUserWizard1.ConfirmPassword + "','"
+ CreateUserWizard1.RequireEmail + "','" + CreateUserWizard1.Question + "','" + CreateUserWizard1.Answer + "')");
sqlConnection.Open();
SqlCommand cmd = new SqlCommand(queryString, sqlConnection);
cmd.ExecuteNonQuery();
On my website, registered users can make a profile about themselves suchas name, Favoirite color, hobbies, etcI have a DataTable called User which hold this information.also there are other datatables for Hobbies and Colors which list all possible options.To let the user update their choices I have a FormView in Edit mode on the aspx page whichis binded to the UserTable with a GetProfileByUserId Method and objectdatasource.
Within the formview, i have added drop down lists that are binded to the hobbies and Colors tables so they can edit their previous selection.On clicking Uodate update formview calls an Update Method that adds new selections to the User databaseNow I have two questionsIs it possible to show in the dropdown list the selected value that the User has already made?If the user only changes hobbies and not colors when they click update will a null value be passed into the data table for colors that replaces their previous selection?
i am making use of two listboxes. the data from one listbox is transfered to other listbox on button click, bt teh the data which is selected must be added to the table in the sql server. but it is not storing values it is throwing execption...ย
private void InsertRecords(StringCollection sc)
{
SqlConnection conn = new SqlConnection("Data Source=ABCD;Integrated Security=True");
StringBuilder sb = new StringBuilder(string.Empty);
[Code].....
I have a dropdown list inside gridview which has a object data source and I am adding the list items as true, false which stores in the database table as a bit value. Even if i am addin the values 1 and 0 to the drop down list, its throwing the below error'grdDebug' has a SelectedValue which is invalid because it does not exist in the list of items.Parameter name: value My code to add the dropdownlist with list items are as below
<asp:TemplateField HeaderText="Debug">
<ItemTemplate>
<asp:DropDownList ID="grdDebug" runat="server" AutoPostBack="false" SelectedValue='<%# Bind("Debug") %>'>
[code]...
How to show pop up menu from database in gridview on each gridview row items ?
Example of this is :
[URL]
Move your cursor to Departure time and arrival time...a want this type of popup in gridview items....which fetch entries from database..