Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=82447 --- shadow/82447 2007-08-15 07:02:59.000000000 -0400 +++ shadow/82447.tmp.9595 2007-08-15 07:02:59.000000000 -0400 @@ -0,0 +1,54 @@ +Bug#: 82447 +Product: Mono: Class Libraries +Version: 1.2 +OS: All +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Wishlist +Component: Sys.Web +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: MasterPages / No exception thrown when using an invalid ContentPlaceHolderID attribute + +Description of Problem: + +When implementing a masterpage in a regular .aspx page, when you use a +<asp:content ... > tag, and supply a invalid ContentPlaceholderID +attribute, that is you supply an ID that is not used in the MasterPage, +Mono will silently ignore this inconsistency, leaving your page to "maybe" +throw "Object Reference not set to an instance..." exceptions, which are +very difficult to figure out if you do not know what is going on. + +Steps to reproduce the problem: +1. Create an Asp.net MasterPage +2. Use the ASP.net MasterPage in an .aspx page +3. Set up an <asp:Content section, however, either misspell or change the +casing of the underlying ContentPlaceHolderID. +4. Add a control, e.g. <asp:textbox ... > in the <asp:Content section you +have made +5. In Page_Load (or somewhere else in code), make a quick test call to the +<asp:textbox ... >, e.g. myTextBox.Text = "Testing" + + +Actual Results: +You will get an "Object Reference not set to an instance of an object", on +your textbox call, however you will not be adequately warned that your +MasterPage is set up incorrectly. + +Expected Results: +Microsoft's framework will throw a "Cannot find ContentPlaceHolder '...' in +the master page '...', verify content control's ContentPlaceHolderID +attribute in the content page." + +How often does this happen? +Always, from what I can see + +Additional Information: +It's a very easy fix, once you understand what is going on, however, the +errors you get don't lead you to the problem. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
