tags:

views:

54

answers:

1

I am generating an ASP.NET Radio button list control in my server side code.I am calling this page from my javascript via ajax.I want to load the RadioButton list control genearted to my DOM using jQuery's Load method.I want to return the HTML of the Control which i generated.IS there any property wwhich would return the innnerHTML / HTML of the control. ?

+1  A: 

You can use the RenderControl method.
Example:

TextBox t = new TextBox();
StringWriter stringWriter = new StringWriter();
HtmlTextWriter writer = new HtmlTextWriter(stringWriter);
t.RenderControl(writer);
return stringWriter.ToString();
Marwan Aouida