Skip to Content
Beginning ASP.NET 3.5: In C# and VB
book

Beginning ASP.NET 3.5: In C# and VB

by Imar Spaanjaars
March 2008
Intermediate to advanced content levelIntermediate to advanced
766 pages
21h 15m
English
Wrox
Content preview from Beginning ASP.NET 3.5: In C# and VB

9.5. Exercises

  1. To make the ContactForm.ascx user control even more reusable, you can create a string property such as PageDescription on it that allows you to set the name of the page that uses the control. You then add this string to the declaration of the control in the containing page. Finally, you can add the description to the subject of the message that you send. This way, you can see from what page the contact form was called. What code do you need to write to make this happen?

  2. Why is it so important that you check the value of the IsValid property of the Page when processing data? What can happen if you forget to make this check?

  3. What's the difference in behavior between the To and the From property of the MailMessage class?

  4. When you use a CustomValidator, you can write validation code at the client and at the server. How do you tell the ASP.NET runtime what client-side validation method to call during the validation process?

  5. How do you tell the validation mechanism that validation succeeded or failed in your CustomValidator routines?

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning ASP.NET 4: in C# and VB

Beginning ASP.NET 4: in C# and VB

Imar Spaanjaars
Professional ASP.NET 3.5 SP1 Edition: In C# and VB

Professional ASP.NET 3.5 SP1 Edition: In C# and VB

Bill Evjen, Scott Hanselman, Devin Rader

Publisher Resources

ISBN: 9780470187593Purchase book