views:

490

answers:

1

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.

+1  A: 

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.

JoshBerke
is there any downside in terms of performance overload ?
Vikram
Performance overload would depend on the load of your site and the page being rendered. I haven't had any problems yet.
JoshBerke