I have a UserControl living on MyPage.aspx. How would MyPage.aspx go
about retrieving the HTML content generated by that UserControl as a
string? I've looked into two options, neither of which seems like any
fun.
Option 1 is to use WebRequest to call MyPage.aspx from elsewhere, then
parse out the HTML chunk that I'm looking for by hand. This is pretty
cumbersome, and requires a separate application/webpage to work (i.e.,
using WebRequest in an MyPage.aspx page to load MyPage.aspx would have
disastrous results).
Option 2 is to mess with the the Render method of the UserControl.
This seems like overkill, since I don't need to grap the HTML content
every time that I run this control. Only on MyPage.aspx.
Anyone care to suggest an option 3 that I may have missed? Prehaps a
refinement to one of the above?
Jason
---
Expat Software Consulting Services
http://www.expatsoftware.com/