Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > newbie: combining 2 menus

Reply
Thread Tools

newbie: combining 2 menus

 
 
Jeff
Guest
Posts: n/a
 
      07-18-2006
hey

asp.net 2.0

I have 2 menu controls on my website. One menu displays the top menu items:
Home, Item A, Item B, Item C.....

The problem is that when clicking on the "Home" menuitem, the user isn't
redirected to Default.aspx, but all the other menu items works..
Default.aspx are using a different master page than all the other pages in
my project (see the copy of my sitemap file below)

Any suggestions on how to solve this is very welcome!

The is the code in my main menu which tells the sub menu what menu items to
display
protected void mnuHeader_MenuItemClick(object sender, MenuEventArgs e)
{
SiteMapDataSource dataSource =
(SiteMapDataSource)lvSidebar.FindControl("SiteMapD ataSource1");
switch (e.Item.Value)
{
case "Home":
dataSource.StartingNodeUrl = "Default.aspx";
return;
case "Item A":
dataSource.StartingNodeUrl = "~/test3.aspx";
return;
case "Item B":
dataSource.StartingNodeUrl = ""~/test4.aspx";
return;
}
}

Here is my .sitemap file:
<?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="~/test3.aspx" title="Item A" description="" >
<siteMapNode url="~/test4.aspx" title="Sub Item 1" description=""
/>
</siteMapNode>
<siteMapNode url="~/test4.aspx" title="Item B" description="" >
<siteMapNode url="" title="Item C" description="" />
</siteMapNode>
<siteMapNode url="" title="Item D" description="" />
</siteMapNode>
</siteMap>


 
Reply With Quote
 
 
 
 
Jeff
Guest
Posts: n/a
 
      07-18-2006
After more testing I've discovered that no menu item is working (when I
click on a menu item, then I'm not redirected to it's page)

Please, what is your suggestion?

Jeff


"Jeff" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> hey
>
> asp.net 2.0
>
> I have 2 menu controls on my website. One menu displays the top menu
> items: Home, Item A, Item B, Item C.....
>
> The problem is that when clicking on the "Home" menuitem, the user isn't
> redirected to Default.aspx, but all the other menu items works..
> Default.aspx are using a different master page than all the other pages in
> my project (see the copy of my sitemap file below)
>
> Any suggestions on how to solve this is very welcome!
>
> The is the code in my main menu which tells the sub menu what menu items
> to display
> protected void mnuHeader_MenuItemClick(object sender, MenuEventArgs e)
> {
> SiteMapDataSource dataSource =
> (SiteMapDataSource)lvSidebar.FindControl("SiteMapD ataSource1");
> switch (e.Item.Value)
> {
> case "Home":
> dataSource.StartingNodeUrl = "Default.aspx";
> return;
> case "Item A":
> dataSource.StartingNodeUrl = "~/test3.aspx";
> return;
> case "Item B":
> dataSource.StartingNodeUrl = ""~/test4.aspx";
> return;
> }
> }
>
> Here is my .sitemap file:
> <?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="~/test3.aspx" title="Item A" description="" >
> <siteMapNode url="~/test4.aspx" title="Sub Item 1"
> description="" />
> </siteMapNode>
> <siteMapNode url="~/test4.aspx" title="Item B" description="" >
> <siteMapNode url="" title="Item C" description="" />
> </siteMapNode>
> <siteMapNode url="" title="Item D" description="" />
> </siteMapNode>
> </siteMap>
>



 
Reply With Quote
 
 
 
 
Jeff
Guest
Posts: n/a
 
      07-18-2006

"Jeff" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> After more testing I've discovered that no menu item is working (when I
> click on a menu item, then I'm not redirected to it's page)
>
> Please, what is your suggestion?
>
> Jeff
>
>
> "Jeff" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> hey
>>
>> asp.net 2.0
>>
>> I have 2 menu controls on my website. One menu displays the top menu
>> items: Home, Item A, Item B, Item C.....
>>
>> The problem is that when clicking on the "Home" menuitem, the user isn't
>> redirected to Default.aspx, but all the other menu items works..
>> Default.aspx are using a different master page than all the other pages
>> in my project (see the copy of my sitemap file below)
>>
>> Any suggestions on how to solve this is very welcome!
>>
>> The is the code in my main menu which tells the sub menu what menu items
>> to display
>> protected void mnuHeader_MenuItemClick(object sender, MenuEventArgs e)
>> {
>> SiteMapDataSource dataSource =
>> (SiteMapDataSource)lvSidebar.FindControl("SiteMapD ataSource1");
>> switch (e.Item.Value)
>> {
>> case "Home":
>> dataSource.StartingNodeUrl = "Default.aspx";
>> return;
>> case "Item A":
>> dataSource.StartingNodeUrl = "~/test3.aspx";
>> return;
>> case "Item B":
>> dataSource.StartingNodeUrl = ""~/test4.aspx";
>> return;
>> }
>> }
>>
>> Here is my .sitemap file:
>> <?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="~/test3.aspx" title="Item A" description="" >
>> <siteMapNode url="~/test4.aspx" title="Sub Item 1"
>> description="" />
>> </siteMapNode>
>> <siteMapNode url="~/test4.aspx" title="Item B" description="" >
>> <siteMapNode url="" title="Item C" description="" />
>> </siteMapNode>
>> <siteMapNode url="" title="Item D" description="" />
>> </siteMapNode>
>> </siteMap>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
combining menus problem richard HTML 6 02-27-2012 10:43 AM
Combining DVDs with menus on a Mac Robert Peirce DVD Video 0 03-30-2006 09:03 PM
Select menus above flyout menus? help? news.west.cox.net HTML 8 12-09-2004 12:54 PM
Combining Newsgroup Messages tirebldr Firefox 4 10-31-2004 11:15 AM
Combining files zebra@cix.compulink.co.uk Firefox 3 07-29-2003 10:27 PM



Advertisments