you dont need to mess about with the registerclient script.
instead of OnClick="javascriptfunction();"
use object.attibutes.add("onClick", "javascriptfunction();");
that way you only add the attributes for objects you want to have client
events.
--
Regards,
HD
Once a Geek.... Always a Geek
"Rajan" <an*******@discussions.microsoft.com> wrote in message
news:1C**********************************@microsof t.com...
Thanks for you reply. But my problem is little different.
Let me explain the scenario to you.
when I click on the button "A", I want the focus to be set to "TEXT1". So
I call RegisterClientScriptBlock method to set the focus using
javascript". it works fine.
When I click on Button "B" in the same page I dont want to do anything
regarding focus, so I didnt call RegisterClientScriptBlock methed this
time.
But still the Page persists the javascript which was previously emitted
and set the focus to "TEXT1" which I dont want.
How to remove the script which was emitted at the first time
Thanks.