MVC :: Display Site Navigation In Project Using Breadcrumb
Sep 20, 2010i wants to display site navigation in my project using breadcrumb.
View 7 Repliesi wants to display site navigation in my project using breadcrumb.
View 7 Repliesi've been looking everywhere to find a good tutorial on building a simple breadcrumb navigation for my application. I know that MVC 2.0 can do this very easily but for my application it needs to be in 1.0 as that is what is used at the University. Could anybody point me in the right direction as I seem to be spending way too much time for something that is supposed to be a simple add on.
View 1 RepliesI have a question for the navigation and I don't know how. For example when the users access the product page, on the top of the page it will display home > product, if the user access one product in the pens category, it will display home>product>pens.
View 6 RepliesI'm using a custom sqlsitemapprovider to get my site hierarchy out of the database and display my navigation. Now, I have the following main (parent) nodes:
Home - Products - News. What I want to achieve is this, suppose you click on products then a subnavigation appears like this:
productGroup1,productGroup2, productGroup3.
But when you click products, no selection was made from the subnavigation, how would I achieve that if someone clicks on products, the
first product with content from the first productGroup1 shows up?
To visualize this: I click on Products -> Subnavigaton gets rendered -> PG1 - PG2 - PG3 -> page displays product1 of PG1
Is there as build in manner to accomplish this or how would one create a method to make this work?
P.S.:For my navigation, I'm not using any build in navigation controls, I'm rendering my menu as an html unordered list e.g: <ul><li></li></ul>
We have a site that allows a user to drill down through a list. The drill down works by the page calling itself with a different query string. From any level they can choose to go to a different page dealing with the subject matter for that level. All of that works great. However, we would like to put a breadcrumb on the site that allows the user to walk back up the path they used to get down.
Most of the breadcrumbs I have seen do not save the query string. Also, many use some kind of external data provider (database or XML) to build the site map. I am not sure how that would work with the recursive page calls. I don't mind looking at products or coding it myself. I have actualy built something, but it is quirky when people use the browser back button.
my sitemap path currently displays the root node of my website and only a child node. it is binded to the following web.sitemap:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="~/home.aspx" title="Home" description="">
<siteMapNode url="~/biography.aspx" title="Biography" description="">
</siteMapNode>
<siteMapNode url="~/links.aspx" title="Links" description="">
</siteMapNode>
<siteMapNode url="~/movies.aspx" title="Movies" description="" >
</siteMapNode>
<siteMapNode url="~/contact.aspx" title="Contact" description="">
</siteMapNode>
</siteMapNode>
</siteMap>
however i want the breadcrumb to display links exactly like my menu. for ex: home|links|bio|register not the child and its parent node!
I have a site that uses parameters in the query string to determine what content to display.
page.aspx?id=1 - Main page
page.aspx?id=1&p=2 - Main page showing info A
page.aspx?id=1&p=3 - Main page showing info B
My issue is that my sitemap contains an entry for page.aspx?id=1, which displays my breadcrumb as it should; however, I obviously don't have an entry for page.aspx?id=1&p=2 so my breadcrumb breaks. I am still on the page.aspx?id=1 page and would like the breadcrumb to display correctly.
Is there a way to remove all the parameters from "&" right? So that my breadcrumb will still display correctly. I've seen options using SiteMapResolveEventHandler but I couldn't get them to work.
I want to display the gridview content in breadcrumb style.
View 5 RepliesI have 3 site map path like this
1 st page and 2nd page is different 3 and 4th one are common for all navigations
Navigation 1
Home(Page1.aspx) ---> Begin(Page2.aspx)------>Choose(Page3.aspx)-------->Use(Page4.aspx)
Navigation 2
Home(Page7.aspx) ---> Begin(Page47.aspx)------>Choose(Page3.aspx)-------->Use(Page4.aspx)
Navigation 3
Home(Page17.aspx) ---> Begin(Page27.aspx)------>Choose(Page3.aspx)-------->Use(Page4.aspx)
I have a site with a few pages, and I decided to have my navigation button (to go from page to page) on my site.master page so every page looks the same. Two questions:
1. is that the correct thing to do? seems to work fine, I'm just not sure if it is proper or not.
2. with the navigation/buttons being on the site.master. How can I pass an "id" from one page to another.
Example:
<asp:Button ID="Button5" runat="server" CssClass="style2" ForeColor="#000084"
PostBackUrl="~/Inbounds.aspx" Text="Inbounds" />
I want the postbackurl to be "~/Inbounds.aspx?id=" a value from a textbox on the page you are leaving. More or less to pass a company name or ID number from page to page, so the queries know who the "owner" is?
I am having difficulties combing site navigation & securityTrimmingEnabled together.Please see my code below, let me know what am I missing:web.config file:
<siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
<providers>
<clear/>
[code]...
am wondering how to do the following... I have a registration system. When the user successfully registers, he is then led down a series of data gathering pages (for his profile) and then,finally, ends on his profile's home page where he can start to use the site. All this happens without ever logging into the system so, he is unauthenticated
and unconfirmed. My question is, how does this happen? How can I allow my user to be unauthenticated (and unconfirmed, but this I understand) and use all aspects of the Web site? The way I have things set up right now, my code should be doing this:
case CreateProfileStatus.Success:
//FormsAuthentication.SetAuthCookie(userName, false);
Response.Redirect("NextPage.aspx", false);
[code]...
i want to display my navigation in 2 horizontal menus, one on the top, the other on the bottom. I also want to use sitemap since it ease the maintenance of links. Is there a simple way to achieve this ? (I am not talking about Parent child, say i want to display the first 8 nodes in up menu and the left in the bottom menu.)
View 5 RepliesI am following this tutorial [URL]and would like to know if somebody can provide the CSS used in the example.
View 2 RepliesI am building a project in asp.net 4.0. My navigation will be database driven where i return a datatable from the db containing all the pages of my site, some will be top level while others will be children and sometimes children of children n-times. Im thinking of going down the nested repeater route and databinding from code behind, dynamically generating repeaters for children, but have read that this is not a best practice and should consider the listview control. Im wanting to build a list of links using an unordered list.
View 1 Replieshandle site navigation and retaining user selections.
On Page 1:
I am using an <asp:ListBox as a filter for an <asp:GridView (gv.datasource=myobj.getdata(lb.selectedvalue))
This functions as expected and the gridview pagination functions as expected.
Each row on the grid provides an <asp:HyperLinkField to navigate to another page (Page 2).
This functions as expected.
On Page 2:
This provides functionality to perform some data creation/manipulation tasks.
It also provides a link to navigate to another page where other tasks can be performed (Page 3).
My query is in relation to returning from Page 3 to Page 2 to Page 1.
I would like to be able to return from Page 3 to Page2 to Page 1 and display earlier selections.
Currently, I am using a combination of querystring parameters and sessions vars on each Page_Load to achieve this.
Q1: What are the recommended ways to achieve this?
Q2: Is it possible to dynamically specify url parameters on a sitemap?
I am currently working on a document management system in ASP.NET 3.5 using the Telerik AJAX toolkit. It consists of masterpage with a title banner across the top and a RadTreeview down the left hand side for navigation through the site. The treeview uses a combination of static nodes and dynamic ones. The dynamic nodes are populated via a webservice. When a node is clicked the relevant page is navigated to, reloading the masterpage and displaying the content of the target page.
The problem comes from the fact the treeview's dynamic nodes are populated via a webservice and therefore as the user navigates through the tree to find a document the treeview behaves as you would expect. However, when you get to the bottom of a tree of dynamic nodes the navigation to the page of the navigateurl causes the relevant page to be loaded and then the treeview resets itself to a collapsed state. This means the user could be deep in a nest of documents but when they view one, the tree collapses and they have to start their navigation all over again. This limitation is not going to be acceptable from an ease of use perspective.
According to Telerik, this is the designed behaviour for performance reasons - the node only ever worries about populating the next set of nodes and therefore the treeviews state is not remembered in viewstate.
So, the meat of question is. Is the masterpage/async treeview navigation design pattern a valid one? Are there any other ways to have an ajax treeview on a masterpage, that remembers it's state when another page is navigated to? I have considered a siglepage/updatepanel/partial page rendering model but the opinions I've seen on the net infer that this is bad idea. It confuses users that expect back/forward browser behaviour to navigate through the site but in a single page world they would end up leaving the site.
I also thought that maybe using a single page container and an iframe may work but this seems to be moving away from the "standard" design pattern of using masterpages.
My issue is,i have two tables
Table Maincategory:
Id(p.k)
Category name,
Description
Table Subcategory:
Id(f.k)
SubcatID
Subcatname
Desc
My issue is, i need to display my Table(A) categoryname in my vertical menu such as
ashok
kumar
suresh
john.
if i click ashok, with respect to its id,(say id is (1),it should pick the subcategoryname (2nd table's) name corresponding id(1) from 2nd table...and it should display as sub menu is it possible.
What is the difference between a Project and a Web Site. In Visual Studio it offers File | New Project ... and File | New Web Site As what I develop are going to be web sites, I choose File | New Web Site I have a number of web sites that all access the same database and within each web site I have a lot of duplicated functionality - like GetContact(int ContactID), GetNotes(int JobID) etc. etc. Can I keep all the common code in one place and access it from each web application? I have the idea that this is what a 'Solution' is for, with the ability to add various Projects to a Solution.
But, if you create a web site (as opposed to a project) you don't seem to be able to reference another project.
I'm using SQL Server 2008 R2 Express and try to add ASPNETDB.mdf database to my web site project. However, the following message appears: "Connections to SQL Server database files (.mdf) require SQL Server 2005 Express or SQL Server 2008 Express to be installed and running on the local computer. The current version of SQL Server Express can be downloaded at the following URL: http://go.microsoft.com/fwlink/?LinkId=125883".
View 5 RepliesOur company has web site as www.mycompany.com.I created a asp.net project as ORDERS (open it using default.aspx) and boss wants to list it as www.mycompany.com/orders.
View 4 RepliesI need to enable compression to speed up my site.However, I only found way to do it via action filter which requires me to put [compress] action filter to every actions.such as; [URL]aspxThis is quite lots of work and I may miss an aciton which is not desiable.So, is there a way to enable compression site level? I mean, by changing config or put code in request handler to support compression.Also, action fileter approach doesn't compress javascript or css.How do you support compression? Is there a way to support it?I heard that there is a way to do it via IIS, but my hosting site doesn't support this.
View 10 RepliesI want to publish an asp.net 4.0 project to a hosting site. I uploaded the three SiteMaster files and the three default files. It has an error on the first line of the SiteMaster.aspx. The error message was "Could not load type 'PorjectName.SiteMaster'." What files should I upload?
View 5 RepliesI'm a bit cautions about converting one of my sites to .net 4 at the same instant I move to vs2010. When I convert the sln and csproj files, there is an option to "convert web sites to .net 4" which I did not check.Once I get more comfortable using vs2010, I'd like to do that conversion to .net 4, but I can't find an option to do that in VS.
View 2 RepliesI want to import DLL file in my web site project. I have dll file "my.dll" in folder C:DLLDir and I'm using the code :
[DllImport("C:\DLLDir\my.dll", EntryPoint = "Out32")]
This works ok. But I want to use relative path (web site root path) . I'm trying to put "my.dll" in "bin" or root folder and I'm using the code :
[DllImport("my.dll", EntryPoint = "Out32")]
but I'm getting the error: Unable to load DLL 'my.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)