I have a User control and i have a method isDirty() added to this user control. This user control is used in many places.
How do i access this method using javascript .How do i create a javascript object for this particular user control and then access it with the find method ?
The $find('__The id of the user control ') ? I tried get null .???
Thanks & Regards, Francis
js object is created like this:
You cannot access any server side methods with JS directly. Make an AJAX request with a JSON object, parse it in ASP.NET, and in ASP.NET, call your function you want based on what it says in the object.
Flash can use ExternalInterface.addCallback to do a direct JS access but I am not sure ASP.NET has such a thing (and I would strongly recommend against using a "Flash's blackbox JS access" style anyway).
If you already added a JS object to your user control somehow server side by executing javascript, you just access it like this: