When SharePoint Designer has its own designs

Posted by PeterBrunone on ASP.net Weblogs See other posts from ASP.net Weblogs or by PeterBrunone
Published on Tue, 01 Jun 2010 14:46:00 GMT Indexed on 2010/06/01 15:04 UTC
Read the original article Hit count: 598

Recently, a colleague came to me with a simple task and an inscrutable error.  He just wanted to populate a text field with a querystring value.  If you've ever done this in SPD, you know it's fairly simple:  create a parameter, map it to a querystring value, and then use the resulting parameter name in your form field.

Having done so, however, he was told the following by the ASP.NET "yellow barf page":

The 'Text' property of 'asp:TextBox' does not allow child objects.

As it turns out, he had done everything correctly.  The problem was that SharePoint Designer had decided the best place for his FieldDescription control was INSIDE the TextBox control.  Obviously the compiler doesn't know what to do with that.  When the FieldDescription was moved to a less obtrusive location, everything worked as expected.

The moral of the story is, as always, don't trust what any WYSIWYG tool gives you.  If it looks great, then fine.  However, if there's a problem, remember that Design mode was written by human beings who make mistakes... just like the rest of us.

Take THAT, Skynet.

© ASP.net Weblogs or respective owner

Related posts about sharepoint

Related posts about SharePoint Designer