I have a navigation menu I would like to display based upon user roles (using.net membership) After several hours and headaches (from banging my head against the desk) I was wondering if someone can point me in the error of my ways.
How can I ensure that when the user is logged in, the appropriate menu items are displayed on the Landing page? Still new to all of this and my current method of 'trial and error' has seen me reach suicide levels this morning!
2 - i have a menu set up on the master page and want to be able to have pages linked from the menu items into the content. What do I need to do to make that work?
here are the errors i am getting
Error 1 Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl). C:MyDocsVisual Studio ProjectsMy ProjectsMyWebSiteDefault.aspx.cs 8 33 C:...MyWebSite
Error 3 'ASP.default_aspx.GetTypeHashCode()': no suitable method found to override c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesmywebsitef75149ab9395c70cApp_Web_kqzprpfz.0.cs 283
Error 4 'ASP.default_aspx.ProcessRequest(System.Web.HttpContext)': no suitable method found to override c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesmywebsitef75149ab9395c70cApp_Web_kqzprpfz.0.cs 288
Error 5 'ASP.default_aspx' does not implement interface member 'System.Web.IHttpHandler.IsReusable' c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesmywebsitef75149ab9395c70cApp_Web_kqzprpfz.0.cs 143
When I login to application, i want Button ad a Header menu like (Admin,Quote....2 button should visible).
If Login User is Admin/Quote then Click on that Button it should show all its child nodes must be as the button horizontally.
Even i have to write the code in the Code Behind of Site.Master. I think i need Repeter's OnItemCommand event but it does not run that methods and how can i filter the sitemap with Role in this Method? I can not able to Find the control in the Code Behind.. Is it possible to show these type of custom menus using SiteMap with Role Filteration?
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.
In my project I create .aspx pages by using master page. But in menu bar when I click the button that I want to navigate, header and menu bar loaded again. I want that only content of the page will be load. How can I do this?
I have a site that was working fine with security. I needed to create my own RoleProvider to give the ability to add Groups to roles based on certain criteria which I successfully did.
The problem is, since then, my main site (a Single Sign On Site) will not show the proper menu items for my users roles. The funny part is that right after I publish it, or restart the application, it works fine. Once it has been running for awhile, I lose my menu items.
If I manually type in the URL to go to one of the pages that I cannot see the menu item and perform some function, all of a sudden all my menu items reappear.
How do I eliminate the error Using Menu.IncludeStyleBlock requires Page.Header to be non-null (e.g. <head runat="server" />). When I add runat=server, I lose my style sheet for the entire app. This beganb failing when I upgraded to vs 2010 and .net 4.0. Worked fine on vs 2008 + .net 2.0.
I have a custom menu, which leverages the standard asp.net sitemap. It works well but some of my pages are dynamically generated by URL rewriter, so they don't sit in the sitemap XML file. At the moment I rolled a custom solution which shows/hides menu items via CSS class and a programmatic check of the role that the user is in. It works ok until I visit a dynamic page that doesn't exist in the sitemap file. I've tried the "roles" attribute in the sitemap file with security trimming but it isn't working because I have a custom menu.
Is there a way I could leverage the roles attribute in the sitemap file to show/hide menu items for my custom control below, even when some pages are not in the sitemap? My menu control is below...
I have the following site map each node should lead to another site map
I have different permissions so for example, if I log in as first, then I want to only be able to access the first sitemap, log in as second, only be able to access the second sitemap.I have written the following code but it doesn't seem to work, it just diaplsys all my menu
I'm using the content-disposition header to force a file download in ASP.NET.
It works, but my problem is that in the save dialog (in any browser), it doesn't seem to know the total file size. (In Internet Explorer, for example, it says Estimated time left: Unknown (Opened so far: XXX)
I thought I had encountered this in the past and fixed by also adding the content-length header. But this doesn't seem to have any affect.
Here's my code (part of the ProcessRequest method of IHttpHandler):
var file = new FileInfo(context.Server.MapPath(path));
as you can see the header width is 100% but not content the two images fields in the content are corresponding to the two last fields in the header ("localiser" and "status") another problem i have is that i have an event of a button dos'ent fire when it is inside one updatepanel but work outside
I have a system with 3 roles to which a user can be assigned to. What I want to display in the gridview is on one line to have user name and then 3 checkboxes for each role. Ticked if a member of that role.
is there a way export the content of a datagrivied to a PDF i want to use this to validate if a user is authorized to sublmit new contenet and create events through the connect website or do i need to couple this with a forms authorization account to handle permissions
I've got a repeater I've bound to column names that are filtered, as they're applied (using sessions currently, I might change this to loop through the columns looking for filters now that I really know how the grid works).
I've got a button next to each filtered column name that is to remove the filter from the RadGrid.
<asp:Repeater ID="repCorpFilters" runat="server" OnItemCommand="repFilters_ItemCommand"> <HeaderTemplate> Current Filters: </HeaderTemplate> <ItemTemplate>
Trying out the asp menu item. I have a static menu across the top, and then when you hover over a menu item, a dynamic menu opens and displays 5 menu items from top to bottom. Only problem is, that the text in each of the 5 menu items is centered, where as I want them to be flush left. I've looked for some align options, but don't see them.
I am new to asp.netI have a master page with menu buttons and five content place holders.I get the expected results from all but the last content place holder.These are the last three content place holders
When the content in LowerLeft or LowerRight is small (less than the min-height) the footer works fine.When the content in LowerLeft is 10-15 lines long the footer does not appear at the bottom of the page.What is the correct syntax for <div id="Footer" style = " ??????????" to accomplish the foter always being at the end of the content no matter how long the content is?I tried position:relative but that did not work
I am using visual studio 2008 and was building a horizontal menu using the menu control from the toolbox. I cannot seem to get the dropdown menu to display over other content on the form such as labels, textbox, etc. I even tried it using a master page for the menu, but it does not work either. What's the secret in this?
I have a simple web site with two pages. One displays a list of files, and the other streams a file when it's clicked in the list. All was fine in production for 6 months, but now I have to move the site to Windows 2008/IIS7. I have it mostly working, but the files don't open properly (in Firefox) because my content-type header is being ignored. On the production site (IIS6) the headers are (using Fiddler):
HTTP/1.1 200 OK Date: Tue, 09 Feb 2010 16:00:51 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Content-Disposition: attachment; filename="myfile__foo.pdf" Content-Length: 236841 Cache-Control: no-cache, no-store Pragma: no-cache Expires: -1 Content-Type: application/octet-stream
I have a gridview ...asp 2.0 and VS 2005.The Gridview has template fields and I am using a Header Templete and an Item Template field.Within the Item template fields I am using a asp: table and within the table I am using different asp controls to bind data to the gridview
Here is the issue ...I want that each datafield should align with each other eactly i.e. symmetricaly each column wise.The problem as of now is that as each row of data is displayed in a new table and as a result each column aligns differently.How can I align the columns with each other?
I am porting an ASP.NET 2.0 project to VS 2010 and ASP.NET 4.0. I have the asp.menu set up to go horizontally across the top of my master page. This works pretty good, but I have a couple of pages that take a long time to load a lot of data (that is another issue though). The problem that I am having is that when these slow pages load the menu is initially vertical and then switches to horizontal. This looks so bad that I had initially thought that it was displaying my sitemap page. I just want it to draw properly (horizontal) to begin with.
Also, the content page has a script manager with CDNenable set to true.