MenuBar - OnMenuItemClick

L

Lubomir

Hi,

I have a MenuBar in a nested master page. I defined a click event handler
OnMenuItemClick. The problem is, when I click on a menu, the handler is not
called. I have such a feeling it could be something related to the fact, that
menu is in a nested master page. Do you have any idea what is wrong?

I am using Vista 64, VS 2008 and .NET 3.5

Thanks for help,
Lubomir
 
L

Lubomir

I am using this code:

<asp:Menu ID="aaa"
OnMenuItemClick="aaa_MenuItemClick"
runat="server" >
<Items>
<asp:MenuItem Text="xxx" navigateUrl="urlx..." Value="valueX" />
<asp:MenuItem Text="yyy" navigateUrl="urly..." Value="valueY" />
</Items>
</asp:Menu>

In code behind:
protected void aaa_MenuItemClick(object sender, MenuEventArgs e)
{
.....
}

When I run the code menu works fine, but when I set a breakpoint into
aaa_MenuItemClick, the program execution doesn't stop there. To check if
"break points work" I tried to put break point into Page_Load - it stopped
there as expected.

Still I think it has something to do with the fact that the menu control is
in a nested master page, and instead of my event handler the default one is
called by the framework.

/Lubomir
 
L

Lubomir

Yes! That solved the problem. Do you have any advise where I could read about
these details regarding ASP.NET? I haven't seen anywhere in the MSDN docs,
that "navigateurl" will make "Click" event not usable.

Thank you for your help,
Lubomir
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top