Vikram
Vikram

Reputation: 6877

Render User control as string template

what do you think of rendering user control as a string template, basically an implementation like Irenderable implementation do you guys think it has any cons. One of the pros that i came across was that i can use my user controls to simply return the required HTML for ajax calls.

Upvotes: 2

Views: 1148

Answers (1)

JoshBerke
JoshBerke

Reputation: 67068

You could also use this approach to render html for emails or PDF. I've done a lot of hackery to grab my pages and render their output to a string builder so I can convert them or email.

I do this when you need a print to pdf for the current page, or email this page and you want to send the html that the user is currently looking at.

Upvotes: 2

Related Questions