Web Forms :: How To Disable A Menu In A MasterPage C#
Mar 29, 2010I have a website that uses a menu displayed in a MasterPage.
On some pages, I would like to disable this menu.
I have a website that uses a menu displayed in a MasterPage.
On some pages, I would like to disable this menu.
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 want to use the asp menu control in under masterpage. But my menu items rendering with their navigation url like in examples.
Music(buy.aspx)
Rock(javascript:__doPostBack('ctl00$sidemenu1$aaaa','bMovies\Action'))
i have master page in that i have menu control i have child page called userlogin.aspxi wants to call menu control in contentpage(userlogin.aspx page).
View 4 Repliesi have dynamic menu in masterpage .
in one place i have to dispaly a page in the browser that page is binded with the master page in that page there is another page that consist of onother page this page is aslo binded with masterpage . now i needed to hide the dynamic menu in the second page i tried in other ie.. but it is not comming
any control outside of masterpage contentplaceholder can be accessible or not
I'm trying to develop a webpage for a small college who want to keep the format similar to an existing webpage. I've created an ASP.NET master page and included a menu (web.sitemap) to navigate the various pages of the school's site. However, I'm trying to format the menu to match their existing old style html websites.
I need to place a line between the various items of the menu. I've tried border but I need the lines to appear above and below the items (or inbetween) and not on the left and right. I've read that I may have to use CSS to format it the way I want but i can't figure out the code to so.
i did dynamic menu control in master page , my problem is that each time iam loding the masterpage new
dynamic menu created, i don't want to create again.
master page load event
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
if (Session["UserID"] != null)
[code]...
How do you generate a list of NavigateUrl s of a static Menu on the MasterPage.Master ?
The following code just returns the first level of Menu NavigateUrl items.
The code will return Home.aspx but not "FAQ.doc" and "Trouble Shooting.doc".
[Code]....
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 RepliesWhen I began my first ASP.NET project, I didn't know about Masterpages, which was a pain. Because I had to manually change each and every link on all of my web pages. This was all mainly for the top menu and side menus.
But now that I'm using a master page, I think it's going to be much easier. But, I'm running into an issue.
When the user loads default.aspx, they see the following on the top menu.
Which is how I want it. But, what if they click one of the links? Before, I just updated that code to make the button of that page the active one. But, if they're all inheriting the same page, how do I commit this changes? I don't want to omit that part and manually change it on each page, because that would beat the entire purpose of doing this.
I also don't want to create another master page for each link. That would also beat the purpose.
I am using asp menu.I want to disable it and enable it using javascript.
[Code]....
I want to disable the whole menu bar with Javascript and I have the menu Id by using firefox...I was hoping for a statement that would disable the whole menu.
My client wants the website to be copy protected. I have already disabled copy and paste, and print using javascript.
Now my client wants to disable the Save as menu in IE. I know the page will get cached in the user's Temporary Internet Files.
But want to make then "ordinary" users hard to get data.
Is there any way to track the "Save As" menu event?
Is there any way to encrypt the page, so that when the user download the page he can only view encrypted content?
Is there any possiblity in asp.net or Dot Net Nuke?
I'm using Visual Studio 2010 and ASP.NET 4.0 to render a Menu control as an HTML list so I can style it using CSS. Here is the code I am using below
<asp:Menu ID="navlist" runat="server" Orientation="Horizontal"
SkipLinkText="" ClientIDMode="Static" DataSourceID="MenuSource"
MaximumDynamicDisplayLevels="0" IncludeStyleBlock="False"
StaticDisplayLevels="2">
</asp:Menu>
This produces the following HTML
[Code]....
At first glance this looks like exactly what I wanted. However, if I open up WebResource.axd there is a whole bunch of javascript code related to the menu. Part of this code is applying it's own inline styles to the list. Using FireBug I can view the HTML markup after the javascript has executed and it looks something like this:
[code]....
These inline styles ultimately affect the layout of my page. I have no need for any of the scripts in WebResource.axd. How can I prevent this script from being rendered in the final markup of the page?
In my website I'm using the standard ASP.NET menu control. I already got so far as to write a custom control adapter to get rid of the rather tacky html output that is generated by the default control adapter.
One thing keeps buggering me though. Somehow ASP.NET is generating extra javascript that I don't want nor need for my menu controls, since I won't be using any of the dynamic features in the control. I replaced the control adapter, so it doesn't generate compatible HTML for that.
how I can prevent ASP.NET from generating the extra javascript for the menu control?
I have a menu with 3 Items; Home, Begineers and Experts. Menu is implemented in a masterpage and I build 3 more separate webpages which inherit the master.Userneeds to login and I store the User category in a Session["Category"].Can I disable the menu item "Expert" depending on the Session["Category"]? ( that is need to disable the menu when category is not equal to Expert)
View 2 RepliesHow can I disable particular <menu item> tag in asp.net menu control, through code at runtime, according to session value??
View 1 RepliesHow to disable File Menu Control (Print option) of Browser in asp.net
View 5 RepliesI have a requirement to disable save as and print options of file menu of the browser in which my portal opens.For this i have used javascript code which clears the clipboard text.Because of this when my pplication is opened then copy paste wont work on the system.Iam calling this method on load of a startup page and afer clearing the clipboard text iam opening my home page through javascript with no menu bar just like a modal popup iam trying ot open.This is working fine for some browsers but IE7 and firefox users are unable to load the applicatio because of this javascript function.Can anyone suggest me how to overcome this or how to disable save as and print option.My final aim is user shouldnt be able to save or print my application data...
View 5 RepliesI have asp:Menu on Master page like:
[code]
On content page (Login.aspx), I got Uesr Type. For Admin type only, I need to show the above bold menu item. No problem for getting User Type as "Admin". Just problem is that, how to visible/in-visible or enabled/disabled above bold text menu item?
I Have a login page and I want to disable the menu options from my master page.
I have come across the following code:
[Code]....
But when I put this into the page load it gives me syntax errors stating menu is a type and cannot be used as an expression.
I have a MasterPage (MasterPage.master) with 2 child MasterPages (specialMaster.master and standardMaster.master). From the MasterPage.master I need to get at some of the controls in one of the children, specialMaster.master, say for example to hide certain
content if a session variable is not null.
I have 2 masterpages. (Default.master and User.master).I have a hidden field in Default.master then how can i get the hidden field value of Default.master file from User.master.is there any way to access that hidden field like: Request.form("hidID") ?
View 2 RepliesI have table called ROLE with fields (id,name,permission) example values (1001,madhu,hr)
I have another table called LOGIN with fields(id,DOB,password) example values(1001,24101989,madhukumar)
What i want is , if i login using the LOGIN table ,it check the id and permission in the ROLE table , if the permission is 'hr' it enable to access the menu , or if the permission is any other it just print the error message ("no permission")
Note: menu is placed in master page , but login is not in the master page ...
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]...