Client code on MenuItem

  • Thread starter Thread starter David C
  • Start date Start date
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
 
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

Back
Top