2.07.2007
ASP.NET side basically done
It was kind of tricky getting it to render the HTML without being on a real page - I forgot/didn't realize/should've known/etc that HtmlTextWriter needs have Flush() called before it actually writes anything to the stream. I'm guessing that method is normally automatically called by the Page object. It took me a bit of playing around to figure that one out.
The really nice part is that the overall amount of work that was required to get to this point was considerably less than I thought it would be. Now I have to wire up everything on the client side, which I think will actually be quite a bit more effort, since I'm not nearly as familiar with AJAX.
Labels: AJAX, ASP.NET, asynchronous, C#, HtmlTextWriter, JavaScript, Sys.UI.Control
ASP.NET for JavaScript rendered controls, continued
I started playing around with it last night, and already have discovered that some of my assumptions will need to be changed.
First, I can't use IScriptControl. IScriptControl depends on having access to a ScriptManager. More specifically, THE ScriptManager that will be on the actual page. So while I could just add ScriptManagers into the controls I create, it would be pointless since it would actually be able to do anything. I will still be using one method from IScriptManager though - IEnumerable
Also, I'm 90% sure that creating my own control type is a bit unrealistic. Its completely possible - with the Visual Studio 2005 SDK, I can even create my own custom directive (like <%@ WebServiceControl ... %>), but it seems more realistic to just inherit from UserControl. The question here is whether TemplateControl.LoadControl(...) (TemplateControl is the abstract class Page and UserControl both inherit from, LoadControl allows you to get an instance of a Page or UserControl from a virtual path) will work from the WebService if I just instantiate a new object.
Labels: AJAX, ASP.NET, asynchronous, C#, DOM, GetScriptDescriptors, IScriptControl, JavaScript, LoadControl, Sys.UI.Control, Visual Studio 2005 SDK
Subscribe to Posts [Atom]