inject XmlHttpPanel progarammatically?

2 posts, 0 answers
  1. zahi kramer
    zahi kramer avatar
    3 posts
    Member since:
    Aug 2009

    Posted 06 Feb 2010 Link to this post

    I need to use XmlhttpPanel inside DotNetNuke (which is built via UserConrtol loaded to the page).
    so i tried this attached application to inject the XmlHttpPanel programmatically to usercontrol and load it to the page
    and i want to activate the panl on the client side via javascript.

    please tell me what is wrong and how i can enable it in this scenario.


    i tried to attach zip file and i can't .
    please give me some email to send it....

    I changed the attached .zip file to .jpg  to be uploadable.
    please change it back to .zip and extract the solution.
  2. Pero
    Pero avatar
    1156 posts

    Posted 09 Feb 2010 Link to this post

    Hello Zahi,

    You should create the RadXmlHttpPanel control in the Page_Init. Then you should attach an event handler to the ServiceRequest server-side event or set the WebMethodName and WebMethodPath in case you are using WebServices. Here is a sample project that shows how to dynamically create a RadXmlHttpPanel control:

    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    <head id="Head1" runat="server">
        <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
            <script type="text/javascript">
                function SetValue()
                    var panel = $find("RadXmlHttpPanel1");
        <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        <input value="Set Value" onclick="SetValue(); return false;" type="button" />

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using Telerik.Web.UI;
    public partial class Dynamic_XmlHttpPanel : System.Web.UI.Page
        protected void Page_Init(object sender, EventArgs e)
            RadXmlHttpPanel xmlPanel = new RadXmlHttpPanel();
            xmlPanel.ID = "RadXmlHttpPanel1";
            xmlPanel.EnableClientScriptEvaluation = true;
            xmlPanel.ServiceRequest += new XmlHttpPanelEventHandler(xmlPanel_ServiceRequest);
            xmlPanel.WebMethodName = "";
            xmlPanel.WebMethodPath = "";
        protected void xmlPanel_ServiceRequest(object sender, RadXmlHttpPanelEventArgs e)
            Label lbl = new Label();
            lbl.ID = "Label1";
            lbl.Text = DateTime.Now.ToString();
            RadXmlHttpPanel panel = (RadXmlHttpPanel)sender;

    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
Back to Top