Sep 27, 2010 05:00 PM|hugonne|LINK
Hi. I'm developing a custom server control, which, on its RenderContents
method, does some fancy work and writes content to the page via the HtmTextWriter passed to the method. My code is something like this:
protected override void RenderContents(HtmlTextWriter writer)
writer.Write("something, say from the db");
Now, I'd like to have a method to refresh the contents of the control (let's say, go to the db again). I was thinking of calling the RenderContents method manually. The thing is that I don't know how to get the HtmlTextWriter object that my page uses so
that I can pass it to the method. How would I achieve this? Would that even work, or is there a better way to do it?
Thanks a lot.