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

[Solved] CLient-Side programming (Creating custom Ajax Requests)

1 Answer 81 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Huy TRAN
Top achievements
Rank 1
Huy TRAN asked on 24 Jul 2009, 09:32 AM
Hi all,
I am practicing with rad Control, and I had a problem in the "Client-side programming" Chapter
Detail:
<body>
    <script type = "text/javascript">
        function myFunction()
       {    
             var ajaxManager = <%=RadAjaxManager1.ClientID%>;      <--- problem is right here
            ajaxManager.ajaxRequest();
       }
    </script>
    ......
</body>

And I got a problem:
"Control 'RadAjaxManager1SU' of type 'UpdatePanel' must be placed inside a form tag with runat=server."

I followed the instruction in RadAjaxCourseWare.pdf
Please give me some advises!

Thanks!
Huy TRAN

1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 24 Jul 2009, 10:20 AM
Hello Huy,

To get proper reference to the ajax manager client object, you need use the following code:

<body>  
    <script type = "text/javascript">  
        function myFunction()  
       {      
            var ajaxManager = $find("<%=RadAjaxManager1.ClientID%>");      <--- problem is right here  
            ajaxManager.ajaxRequest();  
       }  
    </script>  
    ......  
</body> 

Review the following online demo and the help topics linked under the Description tab for further reference:

http://demos.telerik.com/aspnet-ajax/ajax/examples/manager/clientsideapi/defaultcs.aspx

Best,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
General Discussions
Asked by
Huy TRAN
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Share this question
or