Home » Visual StudioRSS

How to add OnClientClick event for asp:MenuItem?

Hello,

I'm stuck in a tricky situation and need help.  I'm using asp:menu control to display menu on my web page. I set navigation url property of each menu item to desired page and it works fine.

The problem is the menu items works only when one clicks at the text area but if some one clicks on the blank area after the text it does not work. I thought of OnClientClick event but it is not there for asp:MenuItem .

How can I achieve this so that no matter where one clicks on the menu item he is taken to the proper page.

Regards,
Piyush
 

2 Answers Found

 

Answer 1


The problem  is the menu  items works  only when one clicks  at the text  area but if some one clicks on the blank area  after the text it does not work. I thought  of OnClientClick event  but it is not there for asp:MenuItem .

How can I achieve  this so that no matter  where one clicks on the software menu item  he is taken to the proper  page.



I'm a new hand, but it seems to me the menu items  are just designed in that way. Maybe you have to try other ways to achieve that.
 

Answer 2

hi,

maybe you colud try their way:

http://forums.asp.net/t/1234690.aspx

or

you could add  click event  on client pageLoad(asp.net ajax or jquery)

 
 
 

<< Previous      Next >>


Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter