Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • anthony hall 222 posts 536 karma points
    Jul 29, 2009 @ 15:22
    anthony hall
    0

    'System.Data.Common.DataRecordInternal' does not contain a property with the name 'Public'.

    hey guys, i'm getting this freakish error. When ever i click on Developer > Macros  and select any macro what has parameters. I get the below error message. Prior to getting this error i created a custom XSLT Extension. Though i'm not sure if that is related. 

    Any thoughts?

    ########

    DataBinding: 'System.Data.Common.DataRecordInternal' does not contain a property with the name 'Public'.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: System.Web.HttpException: DataBinding: 'System.Data.Common.DataRecordInternal' does not contain a property with the name 'Public'.

    Source Error: 

    Line 142:          <tr>

    Line 143:            <td class="propertyContent">

    Line 144:              <asp:CheckBox runat="server" ID="macroPropertyHidden" Checked='<%# macroIsVisible (DataBinder.Eval(Container.DataItem, "Public"))%>' />

    Line 145:            </td>

    Line 146:            <td class="propertyContent">

    Source File: c:\dev\MySite\Website.UI\umbraco\developer\Macros\editMacro.aspx    Line: 144 

    Stack Trace: 

    [HttpException (0x80004005): DataBinding: 'System.Data.Common.DataRecordInternal' does not contain a property with the name 'Public'.]

       System.Web.UI.DataBinder.GetPropertyValue(Object container, String propName) +278

       System.Web.UI.DataBinder.Eval(Object container, String[] expressionParts) +70

       System.Web.UI.DataBinder.Eval(Object container, String expression) +69

       ASP.umbraco_developer_macros_editmacro_aspx.__DataBinding__control54(Object sender, EventArgs e) in c:\dev\SuttonYoung\Stow\Stow.UI\umbraco\developer\Macros\editMacro.aspx:144

       System.Web.UI.Control.OnDataBinding(EventArgs e) +73

       System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +139

       System.Web.UI.Control.DataBind() +15

       System.Web.UI.Control.DataBindChildren() +207

       System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +149

       System.Web.UI.Control.DataBind() +15

       System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +124

       System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +443

       System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +52

       System.Web.UI.WebControls.Repeater.DataBind() +65

       umbraco.cms.presentation.developer.editMacro.macroPropertyBind() +199

       umbraco.cms.presentation.developer.editMacro.Page_Load(Object sender, EventArgs e) +1513

       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14

       System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +43

       System.Web.UI.Control.OnLoad(EventArgs e) +73

       umbraco.BasePages.BasePage.OnLoad(EventArgs e) +16

       System.Web.UI.Control.LoadRecursive() +52

       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2167

     

  • Dejan Ostojic 10 posts 54 karma points
    Aug 14, 2009 @ 13:43
    Dejan Ostojic
    0

    Hi,

     

    I have the same problem. I'm getting the same exception when I try to add parameter to macro. A few days ago I upgraded umbraco to newer version (4.0.2.1.) and then this problem started. Does anyone know the reason for this exception and how to solve it? 

     

    Thanks in advance,

    Dejan

  • KaneC 2 posts 22 karma points
    Aug 19, 2009 @ 15:27
    KaneC
    1

    Seems to be binding to the dr rather than the m_macro object.

    Try replacing the databinding with this in .\umbraco\developer\macros\editMacro.aspx:

    <ItemTemplate>
    <tr>
    <td class="propertyContent">
    <asp:CheckBox runat="server" ID="macroPropertyHidden" Checked='<%# macroIsVisible (DataBinder.Eval(Container.DataItem,

    "macroPropertyHidden"))%>' />
    </td>
    <td class="propertyContent">
    <input type="hidden" id="macroPropertyID" runat="server" value='<%#DataBinder.Eval(Container.DataItem, "id")%>'
    name="macroPropertyID" />
    <asp:TextBox runat="server" ID="macroPropertyAlias" Text='<%#DataBinder.Eval(Container.DataItem, "macroPropertyAlias")%>' />
    </td>
    <td class="propertyContent">
    <asp:TextBox runat="server" ID="macroPropertyName" Text='<%#DataBinder.Eval(Container.DataItem, "macroPropertyName")%>' />
    </td>
    <td class="propertyContent">
    <asp:DropDownList OnPreRender="AddChooseList" runat="server" ID="macroPropertyType"
    DataTextFormatString="" DataTextField='macroPropertyTypeAlias' DataValueField="id"
    DataSource='<%# GetMacroPropertyTypes()%>' SelectedValue='<%#DataBinder.Eval(Container.DataItem,"macroPropertyType") %>'>
    </asp:DropDownList>
    </td>
    <td class="propertyContent">
    <asp:Button OnClick="deleteMacroProperty" ID="delete" Text="Delete" runat="server"
    CssClass="guiInputButton" />
    </td>
    </tr>
    </ItemTemplate>
  • Dejan Ostojic 10 posts 54 karma points
    Aug 23, 2009 @ 17:53
    Dejan Ostojic
    0

    Hi KaneC, thank you for answer. It works ok after these changes!

    Dejan

Please Sign in or register to post replies

Write your reply to:

Draft