Conclusion

 

In this chapter, we examined three issues you might face when building pages and interacting with them forms, errors, and user profiles.

Form-based programming is fundamental in Web applications because it's the only way to have users and applications interact. ASP.NET pages can have only one server-side form with a fixed action property. While you can still change the action property on the fly with a bit of client script code, this often results in a view state corruption error. ASP.NET 2.0 introduces cross-page posting as a way to let users post data from one page to another.

Often, good programs do bad things and raise errors. In the Web world, handling errors is a task architecturally left to the runtime environment that is running the application. The ASP.NET runtime is capable of providing two types of error pages, both of which are not very practical for serious and professional applications, although for different reasons. When a user who is locally connected to the application does something that originates an error, by default ASP.NET returns a "geek" page with the stack trace and the full transcript of the exception that occurred. The remote user, on the other hand, receives a less compromising page, but certainly not a user-friendly one. Fortunately, though, the ASP.NET framework is flexible enough to let you change the error pages, even to the point of distinguishing between HTTP errors.

The third aspect that relates to users and pages that we covered in this chapter is personalization. Personalization allows you to write pages that persist user preferences and parametric data from a permanent medium in a totally automated way. As a programmer, you're in charge of setting up the personalization infrastructure, but you need not know anything about the internal details of storage. All you do is call a provider component using the methods of a well-known interface. Personalization is an ASP.NET 2.0-only feature.

In the next chapter, we'll take page authoring to the next level by exploring powerful and effective ways to build pages, including master pages, themes, and wizards.

 


Programming Microsoft ASP. Net 2.0 Core Reference
Programming Microsoft ASP.NET 2.0 Core Reference
ISBN: 0735621764
EAN: 2147483647
Year: 2004
Pages: 112
Authors: Dino Esposito

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net