C# - SiteMap Navigation And Query String?
Jun 24, 2010
Currently I am trying to figure out how I can add dynamic query string parameters to my sitemap navigation menu. For example, the user chooses the source and edition he wants to work with. I have a simple sitemap that creates navigational links but the parameters the user chose need to be passed in the query string. The default map looks like this:
<siteMapNode url="" title="" description="" >
<siteMapNode url="~/Image.aspx?location=Our Products" title="Our Products" description="Our Products" />
<siteMapNode url="~/Headline.aspx?location=Our Authors" title="Our Authors" description="Our Authors" />
</siteMapNode>
Now the links will need to have the parameters added dynamically depending on what was chosen by the user. For example:
<siteMapNode url="~/Image.aspx?location=Our Products&Source=12345&Edition=asdfff" title="Our Products" description="Our Products" />
<siteMapNode url="~/Headline.aspx?location=Our Authors&Source=12345&Edition=asdfff" title="Our Authors" description="Our Authors" />
View 2 Replies
Similar Messages:
Feb 22, 2010
Here is my web.sitemap code:
[Code]....
I wanna to show bread crumbs navigation like:
Home > Column1 > Content
the problem is: "~/Index.aspx" and "~/Column.aspx?ColumnId=1" are actual URLs and navigation bar: "Home > Column1" really works,
but "~/Content.aspx?ColumnId=1" is only the beginning part of actual dynamic URL, for example: it may be
~/Content.aspx?ColumnId=1&NewsId=12598 or ~/Content.aspx?ColumnId=1&NewsId=37215
all the previous Urls are articles of Column1 with same "~/Content.aspx?ColumnId=1" but are followed with different "&NewsId=number".
So, how can I realize this kind of navigation bar?
Home > Column1 > Content
View 3 Replies
Aug 10, 2010
Scenario: building a site where navigation will be in master page in either left or top menu. What are the advantages to using the ASP.NET navigation system based on web.sitemap files? The alternative I'm considering is just building the links in <li> elements as necessary.
View 2 Replies
Oct 4, 2010
I am trying to strongly type a query for 3 ef objects using linq to sql. There are one-to-many relationships with product and category. My classes contain navigation properties and look like this.
public partial class Product
[Code].....
View 2 Replies
Mar 4, 2010
In my ASP.NET Page_load I have this code:
[Code]....
Where SiteMenu is an Asp:menu control. But for some reason I'm getting a menu with one element with name "siteMap" and a child element with name "siteMapNode".
I would like to have only one element (rappresented by the <SiteMapNode> xml tag ) with title "default". what I'm doing wrong?
I don't want to use a file but an XML string.
View 1 Replies
Nov 22, 2010
Example:
[URL]
I added the iis tag because I am guessing it also depends on what server technology you use?
View 3 Replies
Dec 24, 2010
I m facing some problem. i m not passing Dynamic string through query string..
I m using this code
string abc = "CPCB_" + TextBox1.Text + "_" + TextBox2.Text;
Response.Write("<script>window.open('xml.aspx?Flag=3&date='+abc,target='new');</script>");
View 2 Replies
Dec 7, 2010
Is It Possible to send a string consists of (,.&') in a query string ?
View 7 Replies
May 28, 2010
I have a simple ASP.net page:
<form id="form1" runat="server">
<p><asp:TextBox id="input_box" runat="server"></asp:TextBox>
<asp:Button Text="OK" runat="server" OnClick="run" /></p>
</form>
I want to send input from input_box to a query string, and then keep this input in the input_box when the page reloads.
That's the code behind page:
protected void Page_Load(object sender, EventArgs e)
{
input_box.Text = Request.QueryString["input"];
}
protected void run(object sender, EventArgs e)
{
string url = string.Format("?input={0}", input_box.Text);
Response.Redirect(Request.Url.AbsolutePath + url);
}
Problem is that when query string is not empty, string from input_box cannot be passed to query string. How to correct it?
View 1 Replies
Jan 5, 2011
We are sending an HTML encoded string in the Query string. It was working fine on IIS 6 (windows 2003). We have recently moved the website to Windows 2008 (IIS 7.x). Since the move any Query String that contains "+" sign i.e., "%2b" gives error on the server "404 -File or directory not found."
View 2 Replies
May 11, 2010
We are getting this error message when we try to click the link in the menu to go to Report Server:
Source Error:
Line 31: <siteMapNode title="Reports" description="Reports">
Line 32:
Line 33: <siteMapNode url="https://ffxsqldgc01.ffx.co.fairfax.va.us/Reports/Pages/Folder.aspx?ItemPath=%2fDPZ&ViewMode=List" title="View Reports"
description="Click here to view the reports" />
Line 34: </siteMapNode>
Line 35:
I tried to add after the &, as it was suggested on one of the forum but it did not work. Any other ideas.
View 5 Replies
Aug 2, 2010
I've been having some production runtime errors that I don't fully understand. This has happened to us on a couple different ASP.NET 4.0 Web Sites (shudders - yes, I know - we're porting it to MVC but that's taking some time).
First of all, we have never been able to reproduce this issue in development/QA environments. Secondly, upon deployment, the issue seems to be non-existent. Sometimes the issue manifests within a day or two of deployment and other times the deployment will be live for a month without it manifesting at all. However, once it manifests, then ANY page viewed under the web site causes the error. Lastly, this problem seemed to only come up once we migrated to .NET 4.0. We started at 2.0, a year ago upped to 3.5, and recently upped to 4.0 with this solution and most child projects.
The error:
Could not find the sitemap node with URL '~/Default.aspx'.
A simplified version of our sitemap (with some names changed and uninteresting nodes removed) is as follows:
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
<siteMapNode roles="*" title="EG">
<siteMapNode url="~/../SM/Default.aspx" title="Welcome" description="" roles="*" />
<siteMapNode url="~/../SD/Default.aspx" title="SD" description="" roles="*" />
<siteMapNode url="~/../SMD/Default.aspx" title="SMD" description="" roles="*" />
[code]...
I have confirmed in all of the SiteMaps that there is a node with url="~/Default.aspx" with roles="*" (which includes public/anonymous access), so I am very confused as to why this problem occurs.
SiteMap does not have a node for Default.aspx. All of them do. SiteMap's Default.aspx node is not accessible for security reasons to the current user/role. They're all accessible to anonymous users and this problem even exists for super admin users. Passed-in URL contains querystrings (Default.aspx?abcd). I don't know if this is a problem (I sure would hope not) but once the problem manifests itself, I can handwrite the URL with no querystrings and the problem still exists.
SiteMap changes. It doesn't Service's permissions to the sitemap file. The sitemap works perfectly fine after a deployment, so unless permissions are changed in a way that IISRESET fixes, then this is not an issue. The worker process becomes globally corrupt. I don't think so. We have ~12 web sites all in the same app pool and the problem always stays confined within a single web site. Also, we have yet to have this happen to more than a single web site at a time although it has manifested itself in 4 different ones so far.
View 1 Replies
Jan 25, 2011
I've got a custom menu navigation built from a web.sitemap file, the first line of this would be something like:
SiteMapNodeCollection topLevelNodes = SiteMap.RootNode.ChildNodes;
However, now I want to be able to create multiple web.sitemap files, and then programmatically determine which web.sitemap file to use, but I can't seem to find out how to do this. I'm assuming I could either create one custom SiteMapProvider that can perform the logic to determine which web.sitemap file to load, or I have multiple providers, each one with the SiteMapFile property set to a specific *.sitemap file, and then switch providers programmatically before I access SiteMap.RootNode.
View 2 Replies
Jan 15, 2011
I wanted to create a URL like http://localhost/menu.aspx/?id so that on typing this, it displays all the id's in the database. for eg:134
123
543
234
may be the id's which should be displayed after fetching from the database. However, it should be displayed as it it is without any control or without arranging in any gird etc. How can that be done?
View 1 Replies
Aug 25, 2010
Iam using masterpage and i want to use navigation menu ,but i don't want to use sitemap concept
how to work with navigation menu and assign the pages in navigation menu in master page
View 2 Replies
Oct 6, 2010
I am creating a CacheDependency on the file that my SiteMap provider uses. I would like to get the name of the file from my sitemap provider instead of hard coding it. Is there a way?
Edit
Duh, I forgot to mention: XmlSiteMapProvider that comes with ASP.NET
Edit 2
Reflector shows a private member field called _filename that isn't exposed in any way as far as I can tell.
View 1 Replies
Nov 4, 2010
How would I programatically reference a .sitemap file that is not the root web.sitemap file? I have a file called research.sitemap in a folder a level under root. I want to refernce this file in my code behind like his: SiteMapNode m1 = SiteMap.RootNode (but since this isnt web.sitemap in the root, I dont know how to get access to it).
View 1 Replies
Mar 25, 2010
I have a second level node that goes onto two lines. The first line indents 15px as is set by the class for node level 2. The seond line kicks back to the same level as 1st level nodes. Here's what I mean:
Parent Node
Second node
line 2 of second node
I want it to be like this:
Parent Node
Second Node
line 2 of second node
View 4 Replies
Apr 18, 2010
I want to understand the query string concept and how to use it in the web pages.
View 11 Replies
May 19, 2010
I'm developing a Portal to a school
I need to login (ok)
I also need when the login is ok, to add some buttons to navigation menu, taht is created in the Master Page.
Is it possible?, how?
i already handle the page load on the default page.
View 3 Replies
Jan 19, 2010
In IE 7, I can right click on my page and select properties and (usually) see the query string that was passed to that page.
How do I see this in FireFox? I am having a bug where I should be passing consecutive numbers in the query string, such as deal_ik=1,2,3,4,5 etc but 5 is missing. So I want to examine the query string that is actually getting passed.
View 7 Replies
Feb 8, 2010
I am using Query String in application.
I want to make Query string null when use F5 from Key board.
View 3 Replies
Aug 27, 2010
Is there a difference between me using JavaScript to redirect to URL + "?Querystring=value" versus using whatever mechanism ASP.NET uses?
If there is a difference, how can I make the rendered ASP.NET page be submitted to the same URL with a different query string by JavaScript?
View 3 Replies
Feb 1, 2011
I am developing a web application using the traditional Web Forms model. I have one page that loads the details of a particular destination. The url comes in the following format [URL]. I understand that this is not properly favored when it comes to search engines. what I need is something like this [URL]. How can I get this kind of functionality through web forms.
View 9 Replies
Jan 18, 2010
I am curious if is out-of-date to use query string for id. We have webapp running on Net 2.0. When we display detail of something (can be product) we use query string like this : [URL]We use query string for reason that user can save the link somewhere and come back any time later. I suppose that we use url rewriting soon or later but in mean time I would like to know your opinion.
View 6 Replies