ASP.NET Search Page
This generator creates a standard ASP.NET search page with a criteria panel and
a results grid based on a single model operation, for which a list row and criteria
Xomega objects are defined.
Functionally, this generator produces a search form that is similar to the one generated
by the WPF Search Form
and Silverlight Search Form
generators. However, under the hood it uses standard ASP.NET controls rather than
WPF controls, and is affected by the ASP.NET architecture as outlined below.
- Postbacks. Since Xomega Framework is running on the web server side, an ASP.NET
page needs to make a postback in order to run any of the UI logic encapsulated in
the Xomega data objects. Therefore, controls that change the state of other controls
should have the AutoPostBack property set to true. For example, drop down lists
for the operators always have it set to true, since changing the operator affects
the visibility of the corresponding criteria value field.
- State management. Due to the stateless nature of web applications, Xomega data objects
that serve as a data model for the page need to be stored somewhere to be available
across postbacks. By default the generated page stores them in the user session.
It initializes and stores new data objects if there was no postback, but developers
can update this behavior and also take care of cleaning up the objects to release
memory at some point if that point can be easily identified.
- Grid scrolling/paging. The generator uses the standard ASP.NET GridView for the
grids. Unlike WPF or Silverlight grids, the GridView doesn't automatically support
vertical scrolling, and uses paging instead.
This generator can be rerunnable during initial prototyping phase to allow quickly
visualizing the object model. During this phase you can add additional code to a
separate partial class. However, you will eventually want to edit the generated
code manually to remove columns or fields that should not be displayed and perhaps
add other controls or rearrange the controls on the page. At this point you may
want to rename the generated file, so that the generator doesn't accidentally override
it or delete it during the cleanup operation. This is why it is recommended to make
the generated files start with an underscore to distinguish them from non-generated
Below is a sample page that was generated by this generator.