Add an attribute to your button (say btnTest)
btnTest.Attributes.Add("onClick","your_javascript" )
e.g.
btnTest.Attributes.Add("onClick", "javascript
:alert('Hello')";
or
btnTest.Attributes.Add("onClick", "YourJavascriptFunction()")
--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET) - Early Achiever
Microsoft Certified Application Developer (.NET)
http://www.dotnetgenerics.com/
DotNetGenerics.com -- anything and everything about Microsoft .NET
technology ...
http://www.swanandmokashi.com/ http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
"Sekhar" <Se****@discussions.microsoft.com> wrote in message
news:19**********************************@microsof t.com...
Hi all
I have an ASP.NET Button Control. I woud like this button to make a Call
to
JavaScript function on some condition. How would i do this
Thanks
Sekhar