Hello I wanted a navigation menu for my website, and wanted to create it so that it will be shown on every webpage where I implement it. and when I change something on the navigation that it gets updated for all the other websites where I put the navigation on.
I have heared from a Master Page but I dont think that it will update all sites when I do a change on it.
It would be silly to create a menu and then copy paste it on the other 50 subpages or so.
Regards
I think Master Page is exactly what you are looking for. Just make sure that all of your other pages use that Master Page, and whenever you change it it will affect all the pages using it.
Related
How on earth is this SiteMapPath1 being populated? I have checked everywhere. I don't expect an exact answer just some ideas how it could be getting populated.
Front end
Back end
After page is loaded
The issue I am having is the breadcrumb is displaying an extra node and I have no idea why only discrepancy between my page and all the others what is is inherited. I've checked the data base I've checked all related pages how would one find out where the SiteMapPath gets its hierarchy?
I just want the hierarchy to be correct for some reason my page shows it is a child of another page when it isn't. Maybe there is a way to hide the previous node on my page alone. Should be Home: Email Notifications not Home: Optimized Duty Schedule: Email Notifications. Any ideas would really help thanks.
From a comment by Albert D. Kallal:
there should be a file called Web.SiteMap - that's what drives the SiteMapPath control that is dropped into each page that you want that breadcrumb list. It is not maintained automatic, but maintained by you. So YOU have to maintain that Web.SiteMap, and put what pages you want into that file. You THEN drop a SiteMapPath control onto each form that you want that site map list.
I'm using asp.net and c#.net.
I'm gonna implement a website that has content navigation like that Microsoft did on this link:
Microsoft Windows
In this link you're able to browse page content with freeze header on postback
and also you're able to browse videos from left Navbar without page postback.
The important thing is for each click url is changed.
Any ideas or help would be appreciated.
Thanks and regards
First off, to clarify, postbacks are only required if you're submitting form elements. If you're creating a webforms application, you can easily use controls like HyperLink with a NavigationUrl to navigate among URLs without needing postbacks.
If what you mean is that you're seeing the page partially updating when following links, that's not what I'm experiencing. The pages appear to completely reload when the links in that page are clicked. In your own site, you can use AJAX and JavaScript to implement a navigation system that doesn't require heavy navigation requests. Look at Manipulating the browser history (MDN) for information on exciting new JavaScript features that will let you modify the browser's URL/history without reloading the page. There are several JS libraries that integrate with this feature to give you "AJAX" navigation capabilities.
To simply get the header to not scroll along with the rest of the page, use position: fixed in the CSS for the element.
I'm developing a web template using asp.net and c#, which contains 3 parts. I handle the partial refreshing of the page with using updatepanel.
As you can see in picture below, the first parts is the top menu which is refreshed; the left sub menu, then the left sub menu refresh the middle panel(Details) and shows all the detail which contains a table with insert, delete, edit and paging buttons. I used a listview to develop the tables.
I have more than 50 modules similar to this which contain a table with some buttons, and if I put all the tables in the same page the page, the code would be very huge. That's why I came up with the idea to put each table in separate page and just load each page in the 3rd panel.
I have gone through the Uframe but I couldn't use it at my page properly.
I would really appreciate that anybody help me to overcome this problem, to load separate aspx page in 3rd panel, but without using iframe, or guide me how to use the uframe step by step. Or if you have another idea to get rid of this problem.
This is exactly the type of situation that Master Pages were intended for. Master pages allow you to define a consistent look for pages, with as much content as you like on the Master, and the parts that change in a "child" page (in the ContentTemplate)
Master Pages are documented here and there is an introduction to Master Pages video here.
Master pages can absolutely work with an UpdatePanel as well. This is documented specifically here.
We have an application where we have a single level navigation menu with some heavy-duty pages on each link. The user can switch back and forth between these pages frequently to obtain information that he needs.
Once the page gets generated, it wouldn't change for the session. However, the page is specific to the user, hence we cant cache it.
I was trying to come up with a solution where we generate the page once, and keep it hidden in the background until its link is clicked, but haven't been able to get my head around this.
One of the ways I thought was to have multiple div tags (one for each page) on one page and keep toggling the visibility as the links are pressed, but that would end up making this single page very heavy. Someone also suggested using iFrames, but I am not really comfortable using the iFrames much and I'm not even sure, if it would be any helpful either.
Can you guys please suggest a few approaches to tackle the issue?
update: Just to clarify, we are fine with keeping the pages separate and navigate across using a standard menu bar. We were just looking for ways to optimize the performance as we know that the pages once generated wouldn't change and there should be some way to tap that benefit.
You can use Ajax tab control for this purpose
Try taking a look at this MSDN article which specifically tackles the issue of how to user-level cache. Also, it might be more manageable to break each tab into a user control. That way your ASP.NET page has just the tab control and 1 user control for each section under the tab. It makes managing tabs much easier.
EDIT:
What I would do in your case, since you say the data won't change for the user, is I would grab the static data from the database and then I would store that data in the Session cache. THe session cache is specific per user and you can try to retrieve the static data from there instead of repetitively calling the database.
Check out the ASP Multiview control. Just remember that even though the different views are hidden when not active, their viewstate is still being sent back and forth. Can be a benefit if you need to check control values across views though.
I am currently testing a menu in ASP.NET I've recently made using asp:menu control.
The menu is just as I want it to be right now, but whenever there is a postback that updates the whole page, it moves a little downwards (only once, a second postback won't move it a little bit more).
It's not CSS - > I've removed all CSS from this menu)
It's not any property -> I've commented out everything related to customizing the menu
It's not any other element above it enlarging -> I've specially put it inside a table, in which the only content is the asp:menu control
It moves a lot downwards in IE6, a little in IE8, and it doesn't move at all in Firefox 4.
What could I do ? Are there any alternatives ? Is there any property I can use, or any outer element I could put it inside in order for it to stay still ?
And yes, every single machine this is going to run in is using Internet Explorer. The nightmare of any web developer.
---[update]-----
I've built a menu in a separate project, and the effect wasn't there! I've copied the exact same files into my project, and ran it, and the issue was there.
Could it be a difference in the asp.net version ?
Did you check using IE web developer toolbar to see what's the html looks like in that area before and after the postback? It seems more like a browser issue so the toolbar would give you details as what is coming in the gap or may be what's pushing it down.
If the app is in asp.net 4.0, look at the source code of the page after it renders the first time, and then after the postback. Make sure it renders as divs on both or tables on both.
I currently have a similar issue where my menu "spreads out" on the postback. Before the postback, it renders divs. After the postback, it renders tables.
There is specifically a property on the menu "RenderingMode" which is suppose to control this, but it is not working for me.
I had the same problem. My navigation menu sits in an UpdatePanel, and I changed the UpdateMode from Always to Conditional - problem solved. This was in my master page.