From: Mr. Arnold on
Rnes wrote:
>
> Thanks Greg.
>
> FYI, I am using ASP.net 2.0
>
> I need the autopostback on the text box, because it does a lookup to
> validate the code that was entered there. Most of the time the user
> enters the data, then either hits TAB to go to the next field or
> clicks on another part of the page to do something and then clicks on
> the button.

That's a business rule and business rules shouldn't be at the Web UI. At
best, the Submit button should be doing all validation and look-ups
prior to a save/submit of the data has occurred.

If everything is valid, then the save/submit continues, otherwise it's
stopped.

You should consider on how to use a Model View Presenter pattern in your
Web UI application, as the Web UI should be a dumb UI, and all it does
is call events/methods on the Presenter.

It's the Presenter that does the look-up and applies directly business
rules or calls a Business Layer to apply business rules while the Web UI
remains dumb.

http://en.wikipedia.org/wiki/Model_View_Presenter