Home All Groups Group Topic Archive Search About

Embeding html controls in Server Control

Author
22 Dec 2006 7:01 AM
Raj Dhrolia
Hi Everyone,

I have some HTML snippets (with about 15 HTML controls) that needs to be
embedded into my server control. I need these HTML controls on client side
for some processing (JS).

What is the best way to implement this?

One most straight forward way i can think of is to have something like -
Response.Write("<long HTML string>");

Am not sure if HTC can help, because i only need to pass these html controls
from server to client and nothing more then that.

Thanks,
Raj.

Author
24 Dec 2006 12:24 PM
Phil H
Hi Raj

If you just want to send literal HTML to the client there is the web
server control System.Web.UI.Webcontrols.literal which can be placed
anywhere on the page at design time and then the HTML can be assigned
to .text property at run time.