Rendering a Usercontrol as a String for Webservices

added by deanomachino
3/9/2010 8:16:54 AM


I am currently working a project at work that requires us to use progressive enhancement so that our site is acessible to all users regardless of whether they have javascript enabled. One of the issues that we came across was keeping only one version of the html that we needed to use, regardless whether we were rendering our HTML client side or server side. That way, we only ever had one version of the HTML and this also allowed us to use the same usercontrol server side. This also makes it easier for us to maintain the code.We decided to use usercontrols and just render them as a string to the client side, it is a sneaky approach but it seems to be working nicely.