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

Get HTML output of telerik controls in code

1 Answer 80 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 11 Jul 2012, 10:50 AM
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();

1 Answer, 1 is accepted

Sort by
0
Ivana
Telerik team
answered on 16 Jul 2012, 07:39 AM
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.
Tags
General Discussions
Asked by
Dan
Top achievements
Rank 1
Answers by
Ivana
Telerik team
Share this question
or