Call Javascript and asp .net click event also
-
Hey all, I want to call a javascript function and also the click event that is present in the code behind for an ASP ImageButton. I am using AjaxUpdate Panel and the Click event of the image button is registered for the auto update of the Ajax panel. How do we do that?
Thanks & Regards, Pramod "Everyone is a genius at least once a year"
-
Hey all, I want to call a javascript function and also the click event that is present in the code behind for an ASP ImageButton. I am using AjaxUpdate Panel and the Click event of the image button is registered for the auto update of the Ajax panel. How do we do that?
Thanks & Regards, Pramod "Everyone is a genius at least once a year"
Just add javascript to the onlclientclick event of the imagebutton and make sure to return true from javascript.
Coding C# ExciteTemplate
-
Just add javascript to the onlclientclick event of the imagebutton and make sure to return true from javascript.
Coding C# ExciteTemplate
-
have done that but it gives compilation error...
Thanks & Regards, Pramod "Everyone is a genius at least once a year"
AB7771 wrote:
ut it gives compilation error...
So, you are expecting we will guess what error you are getting ? :doh: Please Provide the proper/details information to get the correct answer. :)
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.
-
Hey all, I want to call a javascript function and also the click event that is present in the code behind for an ASP ImageButton. I am using AjaxUpdate Panel and the Click event of the image button is registered for the auto update of the Ajax panel. How do we do that?
Thanks & Regards, Pramod "Everyone is a genius at least once a year"
maybe you can do it like this In Page_Load event
ImageButton1.Attributes.Add("onclick", "javascript:alert('yes')");