This is a migrated thread and some comments may be shown as answers.

Problem registering script to client side in a custom control.

1 Answer 64 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Johnney Zhang
Top achievements
Rank 1
Johnney Zhang asked on 09 Apr 2013, 09:47 AM
Hi Guys,

I'm starting work on a project who is based on the Telerik RadAjaxManager control and our own control, but seems like the new registered JS on the fly doesn't be called or executes. To simplify the problem, I created a demo control which is really simple and just shows a js "alert" dialog. Also I created a demo to show how we use this demo control and "Telerik RadAjaxManager", if you download the attachment and run the demo, the "Default.aspx" will be shown and a "alert" dialog display,but the problem is that the "alert" dialog doesn't show up again if we click "click me" button. I don't know why. I'm not sure if there is anything wrong I did or it's bug for Telerik RadAjaxManager, if I remove the RadAjaxManager, everything will be fine. please help, it's really urgent for us.

More information:
My development machine: Win7 X64, en-us culture, Vs2010
Telerik.Web.UI.dll version: 2013.1.403.40

The demo attached download address: https://www.dropbox.com/s/mos9y7l4by4dytb/RedControlAjaxIssue.zip


Best Regards,
Johnny

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 12 Apr 2013, 07:58 AM
Hi Johnney,

Note that when Ajax is used you should register the client script using the approaches described in the help topic below:
http://www.telerik.com/help/aspnet-ajax/ajax-execute-custom-javascript.html

I have modified your application using one of this options and it works as expected on my end. Test the attached modified application and let me know if ti works for you.

Greetings,
Maria Ilieva
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Ajax
Asked by
Johnney Zhang
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or