Murach’s ASP.NET 2.0 with C# 2005
How to use email, custom error pages, and
back-button control

This chapter shows you how to implement 3 functions that will make your web sites even more user-friendly: enabling users to send email, displaying a custom error page that tells the user what happened when an error occurs, and making sure users see the page they expect to see when they click on their browser’s Back button.

Chapter 21 How to use email, custom error pages, and back-button control
How to send email 644
An introduction to email 644
How to configure the SMTP service in IIS 646
How to create an email message 648
How to send an email message 650
How to add an attachment to an email message 652
How to create an HTML message 654
How to use custom error handling 656
An introduction to custom error handling 656
How to get and use the Exception object for an error 658
How to code methods that redirect to a custom error page 660
The code for a custom error page 662
How to handle HTTP errors with the web.config file 664
How to handle the back-button problem 666
And introduction to the back-button problem 666
How to disable browser page caching 668
How to use timestamps to avoid the back-button problem 670




Murach's ASP.NET 2.0 with C# 2005

Learn more about this book

View the table of contents

Add this book to your cart



Our Ironclad Guarantee

First, try our books for 90 days. Then, if you aren't completely convinced that our books are the best ones you've ever used, you can return them for a full refund...no questions asked.