CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 7/14/2005 6:59:01 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 5 Views: 24 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
6 Items, 1 Pages 1 |< << Go >> >|
nahrinrs26796
Asp.Net User
Menu control inside user control located inside Master Page does not work7/14/2005 6:59:01 PM

0/0

When I click on any munu items, looks like nothing is getting selected and even

MenuItemClick event is not firing up. Any idea?

I have defined a menu control with SiteMapDatasource control inside a user control which is located on Master page. Any item selection does not anything...

Thanks,
Noreen
dannychen
Asp.Net User
Re: Menu control inside user control located inside Master Page does not work7/14/2005 10:20:57 PM

0/0

Noreen,

The default binding for a Menu control connected to a SiteMapDataSource is to navigate.  It's possible that you're navigating back to your same page?  To get around this you should create a custom databinding and bind the TextField to Title.  Let me know if this doesn't make sense.
--
Danny
disclaimer: Information provided is 'as is' and conveys no warranties or guarantees.
nahrinrs26796
Asp.Net User
Re: Menu control inside user control located inside Master Page does not work7/15/2005 5:12:29 PM

0/0

Hi Danny,

Actually the problem is not navigation...I can navigate through site without any problem. I have following tag:

<StaticSelectedStyle backcolor="red" />

When I select any item from menu, nothing changes and even MenuItemClick event does not fire...My plan is to use StaticSelectedStyle to change the style of my selected tab, but because the Menu Control is inside the User Control and User Control is inside the Master page, it's not working properly!

for more details, this is site map file:

<?xml version="1.0" encoding="utf-8" ?>

<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >

<siteMapNode title="" >

<siteMapNode title="" url="" />

<siteMapNode title="Home" url="Default.aspx" />

<siteMapNode title="Search" url="Search/Basic.aspx" >

<siteMapNode title="Basic Search" url="" />

<siteMapNode title="Advanced Search" url="Search/Advanced.aspx" />

<siteMapNode title="Saved Search" url="Search/Saved.aspx" />

<siteMapNode title ="Search Results" url="Search/Result.aspx" />

</siteMapNode>

<siteMapNode title="My Clients" url="MyClients/Clients.aspx" />

<siteMapNode title="Resources" url="Resources/Resources.aspx" />

<siteMapNode title="Statistics" url="Statistics/Statistics.aspx" />

<siteMapNode title="My Info" url="MyInfo/MyInfo.aspx" />

</siteMapNode>

</siteMap>

and I bound the menu control to the site map file through the code behind:

mMainMenu.DataSource = SiteMapMain;

mMainMenu.DataBind();

and SiteMapMain is defined as:

<asp:SiteMapDataSource ID="SiteMapMain" runat="server" ShowStartingNode="False" SiteMapProvider="SiteMapMainProvider" />

and SiteMapMainProvider is defined as:

<add name="SiteMapMainProvider"

description="SiteMap provider which reads in .sitemap XML files."

type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

siteMapFile="Web.sitemap" />

Thanks for you help,
Noreen

dannychen
Asp.Net User
Re: Menu control inside user control located inside Master Page does not work7/15/2005 9:30:38 PM

0/0

Ah, I see your problem. 

Firstly: although the selected node is normally set (but not in your case for a separate reason) to the current node when you navigate to a page, the MenuItemClick event doesn't fire.  The node is simple set as the selected node through code. 

Secondly: because you're setting the DataSource to an object, it won't do the automatic selection for you anyway.  It only works if the DataSourceID property is used.  You should be setting the DataSourceID property instead.  Change the line:

mMainMenu.DataSource = SiteMapMain;
to
mMainMenu.DataSourceID = "SiteMapMain";  or mMainMenu.DataSourceID = SiteMapMain.ID;

--
Danny

disclaimer: Information provided is 'as is' and conveys no warranties or guarantees.
nahrinrs26796
Asp.Net User
Re: Menu control inside user control located inside Master Page does not work7/18/2005 7:04:45 PM

0/0

Thanks, it's working now.

Noreen
yaip
Asp.Net User
Re: Menu control inside user control located inside Master Page does not work2/19/2006 3:04:51 AM

0/0

I am having the same problem. I am binding to a SiteMapDataSource - smd at design time. However, I have two smd on the same page. Could this be the problem?

Thanks

I love computers because: MY WISH IS THEIR COMMAND :)

<Website>

6 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
C# for Programmers: Updated for C# 2.0 Authors: Paul J. Deitel, Pages: 1317, Published: 2005
Visual C# 2005: How to Program Authors: Harvey M. Deitel, Paul J. Deitel, Pages: 1591, Published: 2006
Visual Basic 2005: How to Program Authors: Harvey M. Deitel, Pages: 1513, Published: 2006
Dictionary of Computing Authors: S. M. H. Collin, Pages: 390, Published: 2002

Web:
Menu control inside user control located inside Master Page does ... Menu control inside user control located inside Master Page does not work. Last post 02-18-2006 10:04 PM by yaip. 5 replies. Sort Posts: ...
ASP.Net 2.0 - Master Pages: Tips, Tricks, and Traps Apr 11, 2006 ... In fact, the MasterPage class derives from the UserControl class. ...... Master pages, being just another control inside a page, do not have ...
Inside Microsoft: Structuring an ASP.NET 2.0 Site using Master ... The line of text inside the content area can easily be added while working in ... The master page acts like a user control, and contains other controls that ...
2 Questions about using AJAX with Master Page When I try to put an AJAX enabled control that I've created inside one of the page ... MasterPage is --not-- a User Control per se but a unique type which ...
2 Questions about using AJAX with Master Page When I try to put an AJAX enabled control that I've created inside one of the page ... MasterPage is --not-- a User Control per se but a unique type which ...
Checking to see what page is loaded from inside a master page file ... What I need to do is test to see what page is loaded inside the ... as stated the master page is a control on the actual page. so to get the ...
user control inside contentplaceholder in master page - ASP.NET Forums Re: user control inside contentplacehoder in master page ... 2. top menu -- not showing in login page --user control. 3. left menu -- not ...
obout inc - ASP.NET EasyMenu - How-To and Help Page ... is not working on my AJAX enabled page! Does EasyMenu work inside User Control or Master Page? ..... The menu is not working on my AJAX enabled page! ...
Postback and dynamically loadiing user controls. What am I doing ... another user control will load. However, I cannot make this work. On the master page is the named "mnuTicketMan". Inside the ...
CodeProject: Masterpage and Javascript document.getElementById ... Whenever a control is inside a page having Masterpage the client id of the .... I made it work in my 2 deep nested master pages and with my Menu control. ...




Search This Site:










sqlsitemapprovider and multiple web.sitemap files

access to wmv files denied in firefox

can't get it to work

error on installtion

blowery compression and dnn3.1 - do they work together

classic asp security vs. asp.net 2.0 - general information

what algorithm is being used for encryptpassword/decryptpassword method?

form module

does anyone have this behaivior with dnn 3.2?

a solution with asp.net and asp projects.

dnn 3.04 -

help deploying site(files) on production server!!!

how to apply a style/class from a css in visual web developer express

how to use sitemap control?

book question

creating a new parent portal - got error "dotnetnuke configuration error"

how to enlarge the content page design

tree of selected category

shared formsauthentication & cookies

ftp security concerns

getting the database to run.

image gallery path problems

vs2005 loginview control

can encryption algorithm change?

dnn 3.0.8 using vietnamese on page.

iterating throw a resultset

help.. i cannot install visual basic project..

how to i login in c# codes?

how do i get rid of the localhost site?

char between menuitems

 
All Times Are GMT