Client code on MenuItem

D

David C

I have not used MenuItems before and I want to have the click of an item run
a local Javascript function rather than asp.net code. I did not see a
OnClientClick option. How do I do this? Thanks.

David
 
M

Mark Rae [MVP]

I have not used MenuItems before and I want to have the click of an item
run a local Javascript function rather than asp.net code. I did not see a
OnClientClick option. How do I do this?

<asp:MenuItem Text="Hello" NavigateUrl="javascript:alert('Hello');" />
 

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
474,181
Messages
2,570,970
Members
47,537
Latest member
BellCorone

Latest Threads

Top