Saturday, March 24, 2012

Modal Popup with Server-Side search

I'm building a data-driven ASP.NET page for processing phone orders. The page starts out with a listing of the items contained in the order, and the user's billing/shipping info.

I'd like to feature a popup that lets the operator search for additional products to add to the order. Sort of like the modal popup control, but with a Textbox for keyword searches, submit button, and a DataGrid for results. The results grid will have linkbuttons by each search result to add it to the order. Clicking the link button will add the item to the order (updated in the order form below the popup), and close the popup.

Is this possible to do with AJAX? I could do this with a regular javascript window.open popup, but I'm hoping for something that acts more like a fat-client application than a web app.

Thanks,

Frank

Yes it is possible. Here's a simplified version of what you want to do.
http://ajax.asp.net/docs/Samples/UpdatePanelApplicationSample1/cs/UpdatePanel4CS.aspx (the focus of this example is animation but it shows the basic idea of what you described)
Clicking the calendar icon unhides an panel where you could select a date. (You could instead have a DataGrid inside the panel.) When finished, the panel can be hidden. This can be done all with server side controls with no page flicker.

This example code is here:
http://ajax.asp.net/docs/ViewSample.aspx?sref=UpdatePanelApplicationSample1 (UpdatePanel4CS.aspx)

These examples are on this doc page:
http://ajax.asp.net/docs/tutorials/usingMsAjaxLibrary/default.aspx


Thanks... this is a good start for me.

No comments:

Post a Comment