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

[Solved] Handling AjaxRequest server-side event.

2 Answers 133 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Stuart Hemming
Top achievements
Rank 2
Stuart Hemming asked on 22 May 2009, 07:34 AM
I have a master page with a RadAjaxManager on it.

I want to handle the server-side event AjaxRequest, but I want to do it in my content page.

Now I can set this up programmatically, by saying this in my content page...
        protected void Page_Load(object sender, EventArgs e) 
        { 
            RadAjaxManager.GetCurrent(Page).AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(WebForm4_AjaxRequest); 
        } 
        protected void WebForm4_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e) 
        { 
            string x = e.Argument; 
        } 
But for completeness (and 'cos I'm going to have to explain this to other people) I'd like to know if this can be done programmatically.

--
Stuart

2 Answers, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 25 May 2009, 04:07 PM
Hello Stuart Hemming,

Thank you for contacting us, however, I am not sure I have fully understood your question. The way you are attaching the AjaxRequest event handler is viable and correct. Could you elaborate more on the issue. In addition, please, keep in mind that your javascript should call the ajaxRequest method in the way explained in the following help article: RadAjax and master page.

Thank you.

Looking forward to your feedback.

Best Regards,
Tsvetoslav
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.
0
Stuart Hemming
Top achievements
Rank 2
answered on 26 May 2009, 07:49 AM
Tsvetoslav,

Sorry, I must have had my brain in neutral.

I'll go back to sleep.

Zzzzzz....

--
Stuart
Tags
Ajax
Asked by
Stuart Hemming
Top achievements
Rank 2
Answers by
Tsvetoslav
Telerik team
Stuart Hemming
Top achievements
Rank 2
Share this question
or