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

AjaxManager within a user control

3 Answers 130 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
chani diakidis
Top achievements
Rank 1
chani diakidis asked on 27 Jan 2010, 10:55 AM
hi,
i'm trying to use an AjaxManager within  a User control's script using your recommended following code:
var ajaxManager = $find("<%= RadAjaxManager.GetCurrent(Page).ClientID
%>");
ajaxManager.AjaxRequest(args);
but everytime the page give me a 'System.NullReferenceException: Object reference not set to an instance of an object' error.
any advice of what could be the reason?
regards

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 28 Jan 2010, 10:06 AM
Hi Chani,

Please refer to the following articles for more information about how to reference the ajax manager in master/content page scenario and trigger ajax requests from the client:
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Ajax/Examples/Manager/MasterPage/DefaultCS.aspx
http://www.telerik.com/help/aspnet-ajax/ajxmasterpageupdateeverywhere.html

I hope this helps.

Regards,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
chani diakidis
Top achievements
Rank 1
answered on 28 Jan 2010, 10:41 AM

0
Pavlina
Telerik team
answered on 29 Jan 2010, 02:06 PM
Hello Chani,

The proper link is here:
http://demos.telerik.com/aspnet-ajax/ajax/examples/manager/usercontrol/defaultcs.aspx

However, does using the following syntax, makes a difference?
C#
radMgr = $find("<%= RadAjaxManager.GetCurrent(this).ClientID %>"); 


Sincerely yours,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Ajax
Asked by
chani diakidis
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
chani diakidis
Top achievements
Rank 1
Share this question
or