Embeding html controls in Server Control

R

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.
 
P

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top