Get HTML output of telerik controls in code

2 posts, 0 answers
  1. Dan
    Dan avatar
    1 posts
    Member since:
    Jul 2012

    Posted 11 Jul 2012 Link to this post

    Hi there,
       For a ASP.NET project we are working on, we need to have the capability of generate Telerik control HTML in server side code and then return the controls's html to front-end via client script for dynamic replacement. 
       We have been unsuccessful in getting Telerik control HTML output via server side code and wondering if everyone have had similar experience can share some knowledge and solutions. 

       Please refer to the code below on how we are trying to get Telerik control HTML output:

    StringWriter tw = new StringWriter(sb);
    HtmlTextWriter hw = new HtmlTextWriter(tw);
    Telerik.Web.UI.RadComboBox rcb = new Telerik.Web.UI.RadComboBox();
    rcb.ID = "sokmething";
    rcb.RenderControl(hw);   // Freeze here during execution
    string b = tw.ToString();
  2. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 16 Jul 2012 Link to this post

    Hi Dan,

    You can use MS AJAX in order to achieve dynamic interaction between the server and the client. Take a look at the following help article for more information: http://msdn.microsoft.com/en-us/library/bb398874.aspx.

    You could find out more on Telerik RadAjax control on the following link: http://www.telerik.com/help/aspnet-ajax/ajx-how-it-works.html.

    Kind regards,
    Ivana
    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.
Back to Top