Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 1st, 2009, 07:19 PM
Registered User
 
Join Date: Feb 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Custom Validation and Master Pages conflict

Thanks in advance for the great book on ASP.NET. The information is well-organized and easy to follow. I've learned a lot so far.

I am trying to implement both Master pages and Custom Validation.

I followed the Try It Out on page 302. If the FORM element is in the content page (and NOT in the Master page) the custom validation works. However, if they FORM element is in the Master page (as suggested by the section on Master pages) the custom validation fails with the following error:

Code:
System.Web.HttpException was unhandled by user code
  ErrorCode=-2147467259
  Message="Control 'ctl00_cpBody_ValidationSummary1' of type 'ValidationSummary' must be placed inside a form tag with runat=server."
I'm just wondering what the solution would be for this situation. Is there a specific requirement that Master pages contain the FORM element? A little extra info on Master pages would be really helpful.

Thanks in advance.

Ted Stresen-Reuter
http://tedmasterweb.com
 
Old February 2nd, 2009, 10:22 AM
Registered User
 
Join Date: Feb 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It turns out there was a content area that was not encompassed by the FORM element in the Master page. The error was a bit misleading but when I fixed the location of the FORM element, everything started working.

Thanks anyway.

Ted Stresen-Reuter





Similar Threads
Thread Thread Starter Forum Replies Last Post
Master Pages micptpuser ASP.NET 2.0 Basics 6 January 8th, 2009 04:50 AM
Master Pages Jayahar ASP.NET 3.5 Basics 1 September 2nd, 2008 04:20 PM
Master Pages, Content Pages and CSS carliviris Visual Studio 2005 0 January 8th, 2008 05:56 PM
Master pages wunnavabk ASP.NET 2.0 Professional 1 June 25th, 2007 07:09 AM
Custom Components Conflict origjones ASP.NET 2.0 Professional 0 January 22nd, 2007 05:24 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.