RE: newbie: menu / sitemap problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I don't think that your problem has anything to do with the redirect.

You could try separating the
<siteMapNode url="~/Search.aspx" title="Search" description="" />
<siteMapNode url="~/pageA.aspx" title="ItemA" description="" />
<siteMapNode url="~/pageB.aspx" title="ItemB" description="" />

into a separate sitemap file and creating a new SitemapProvider that the
side menu would bind to (you can specify the sitemap file in the sitempa
definintion)

or
(and I haven't tried this myself)
The sitemap schema allows you to specify a provider or sitemap file on a
sitempa node. So what you might be able to do is:

<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0"; >
<siteMapNode url="Default.aspx" title="Home" description="">
<siteMapNode url="~/Network.aspx" title="Network" description=""
siteMapFile="newFile.sitemap">
</siteMapNode>
<siteMapNode url="~/Result.aspx" title="Result" description=""
siteMapFile="newFile.sitemap">
</siteMapNode>
<siteMapNode url="" title="Forum" description="" />
</siteMapNode>
</siteMap>

Note that when the XMLSitemapProvider tries to find a node it search the
node list by url, including the querystring. This could cause you problems,
you may need to strore the name query string parameter in session.

Hope this helps,

Garth

"Jeff" wrote:

Hey

asp.net 2.0

My webportal consist of 2 menus (a header menu which goes horizontally
across the top of the page. And a sidebar menu to the left. The menuitmes
shown in the sidebar menu is dependent on what menuitem is selected in the
main menu.)

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0"; >
<siteMapNode url="Default.aspx" title="Home" description="">
<siteMapNode url="~/Network.aspx" title="Network" description="" >
<siteMapNode url="~/Search.aspx" title="Search" description="" />
<siteMapNode url="~/pageA.aspx" title="ItemA" description="" />
<siteMapNode url="~/pageB.aspx" title="ItemB" description="" />
</siteMapNode>
<siteMapNode url="" title="Forum" description="" />
</siteMapNode>
</siteMap>

When the "Network" menuitem in my main menu is clicked the sidebar menu
displays these menu items "Search", "ItemA", "ItemB". So now if the user
clicks on the "Search" menuitem in the sidebar menu, the sidebar menu
continue to display the same menuitems ("Search", "ItemA", "ItemB").

Problem:
In the "Search.aspx" file there is a button (btnSearch), which when clicked
executes this code:
protected void btnSearch_Click(object sender, EventArgs e)
{
Response.Redirect("~/Result.aspx?name=" + txtFullname.Text);
}

So when the result.aspx page is displayed. the sidebar menu is empty. I
think this must be related to using "Response.Redirect" to open the
"result.aspx" page. When the "result.aspx" page is opened. I want the
sidebar menu to continue to display the same menuitems ("Search", "ItemA",
"ItemB") as it did in the "search.aspx" page.

Any suggestions?

Jeff



.



Relevant Pages

  • CASE SOLVED
    ... I mean I don't understand how putting the sidebar menuitems in ... sitemap file and 1 provider. ... When the user clicks on the "Network" menuitem in the main menu, ... into a separate sitemap file and creating a new SitemapProvider that the ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: newbie: menu / sitemap problem
    ... When the user clicks on the "Network" menuitem in the main menu, the sidebar ... into a separate sitemap file and creating a new SitemapProvider that the ... sidebar menu to continue to display the same menuitems ("Search", ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: roleProvider and Windows Authentication
    ... Enable security trimming in web.config and use the authorization element - you have to authorize anyway - then use the role attribute in the sitemap file - if you want to show the links regardless of authorization. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: SiteMapPath control doesnt like named anchors in sitemap
    ... This permits the breadcrumb to correctly ... interpret where it is in relation to the sitemap and the page being viewed. ... The site has several navigation elements, all based on the standard VS2005 ... uses a smaller sitemap file to specify section headings. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Convert XML file
    ... I am trying to convert an Asp.Net 2.0 XML sitemap file to a Google's ... I am posting the formats of both files. ... Asp.Net to Google sitemap. ...
    (comp.text.xml)