2012年3月24日土曜日

Returning a Form for Master Detail pages.

So I am trying to do something in .NET with AJAX that I do rather easily in jsp. It seems like such a common thing, I can only assume that I am just not googling the right terms, and any help would be apreciated. Here's the scenario:
Standard master detail says show a list of items, click one, be taken to a form to edit the item. What I'm looking for is the click on the link just populates the form for the proper item, which is rendered either below or to the right of the list. User edits the item, clicks a button on the form, the form is submitted (also just that region submitted, not the whole page), and a message for success or failure is shown.
I am able to do this with ease in jsp with several frameworks but am now working in the .NET arena and am having no end of trouble. I get as far as:
display the list
onclick call and ajax function (currently using AJAX.NET)
proper method gets called
I render a custom user control (contains a form) into an htmlTextWriter backed by a TextWriter backed by a StringBuilder, and I return that string to replace the content of a div on the page.
Several problems:
Why the need to jump through hoops with the various writers? Is there an easier way to just render a page snippet/custom control into the response stream?
Is there or will there be a facility to return server generated controls/control hierarchies from the server with Atlas?
What am I missing here? Any help would be greatly appreciated.
Thanks

You may want to try the refresh panel library:http://www.gotdotnet.com/Workspaces/Workspace.aspx?id=cb2543cb-12ec-4ea1-883f-757ff2de19e8
Or wait for Atlas to implement similar features.
Thanks for the link - I'll check it out.

0 件のコメント:

コメントを投稿