L
lisa
Can I do this?
I'm playing with AJAX, and it occurred to me that it'd be a lot easier
to make changes to a control on the server, grab the HTML that control
would now render, and return that to the client, where Javascript could
just use outerHTML to replace the whole control.
The obvious catch is generating that HTML.
I tried making an HTMLTextWriter and doing control.Render(writer), but
that gave me an error.
I don't want to override the Page's Render method, because I want to
make this fairly self-contained. Just stick it in a helper function in
a helper class, basically.
And after banging my head against it for a few days, I thought I'd ask
if anyone knows (a) how to do it, or (b) whether it can be done.
Thanks muchly,
Lisa
I'm playing with AJAX, and it occurred to me that it'd be a lot easier
to make changes to a control on the server, grab the HTML that control
would now render, and return that to the client, where Javascript could
just use outerHTML to replace the whole control.
The obvious catch is generating that HTML.
I tried making an HTMLTextWriter and doing control.Render(writer), but
that gave me an error.
I don't want to override the Page's Render method, because I want to
make this fairly self-contained. Just stick it in a helper function in
a helper class, basically.
And after banging my head against it for a few days, I thought I'd ask
if anyone knows (a) how to do it, or (b) whether it can be done.
Thanks muchly,
Lisa