I have a custom aspx page in my SharePoint 2010 WCM site. Data is pulled from a list into a DataTable and alot of the fields are then bound to the page using the Eval method. Rather than using strings directly in the aspx page I have defined the strings in a class which encapsulates all my methods regarding a particular list. e.g.

<asp:Literal ID="progimage" runat="server" Text='<%# Eval(Programme.Fields.ProgImage) %>'/>

This works in testing and worked in production until the client upgraded to SP1. Now we are getting the message:

Error - A call to Bind was not well formatted. Please refer to documentation for the correct parameters to Bind.

Using strings directly works fine e.g. Eval("Title")

Can anyone explain why it may have stopped working all of a sudden? I've upgraded the test site to SP1 but can't recreate the problem. It does run with considerably lower security. Programme is a public static class. The field are defined like this:

public static class Programme
    public static class Fields
        public static string ID = "ID";
        public static string Title = "Title";

They are still successfully accessed from the page's code behind file, only the aspx is a problem.

Any help appreciated.

  • I think you'd have to read the release notes of SP1 to see if anything changed with regards to databinding. Sorry, can't offer more than RTFM :-)
    – Fox
    Dec 13, 2011 at 6:27
  • Not sure it caused by SP1. Try to force recompilation of the aspx by editing it(you can open page,insert space and save).I assume you have this page in file system. Dec 13, 2011 at 8:42

1 Answer 1


Thanks for you comments

The answer was actually to add the PageParserPaths section to web.config so that server side scripting was enabled as per http://blogs.msdn.com/b/kaevans/archive/2007/04/26/code-blocks-are-not-allowed-in-this-file-using-server-side-code-with-sharepoint.aspx

I have absolutely no idea why it worked before the upgrade as I don't remember the client ever adding that block.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.