David C
2008-02-05 10:28:57 PM

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


 

Re: Client code on MenuItem

Mark Rae [MVP]
2008-02-05 10:39:00 PM

"David C" <dlchase@lifetimeinc.com>wrote in message
news:OwzYZOAaIHA.4332@TK2MSFTNGP04.phx.gbl...

>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');" />


--
Mark Rae
ASP.NET MVP
www.markrae.net

 



Re: Client code on MenuItem

David C
2008-02-05 10:49:00 PM

Thank you.
"Mark Rae [MVP]" <mark@markNOSPAMrae.net>wrote in message
news:%23gdhqTAaIHA.4160@TK2MSFTNGP03.phx.gbl...
>"David C" <dlchase@lifetimeinc.com>wrote in message
>news:OwzYZOAaIHA.4332@TK2MSFTNGP04.phx.gbl...
>
>>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');" />
>
>
>--
>Mark Rae
>ASP.NET MVP
>www.markrae.net