CodeSmith Community
Your Code. Your Way. Faster!

EntityDataSource's Provider="" Keeps appearing automatically

Latest post 07-03-2008 6:51 AM by blake05. 8 replies.
  • 08-30-2007 6:00 PM

    EntityDataSource's Provider="" Keeps appearing automatically

    Hi, This is happening almost from the day i started using nettiers (a weeks ago). In this example, i started a new webform from scratch. I have a , inside an tabcontainer and two tabs (AJAX). on one tab, i have GridView, and its DataSource (i'd read in another post that datasource must be at the same level as GridView is). Now, whenever i make a chage in the form, the following error arises (wich keeps me from building my project, and so, work :P ) ArticleDataSource:Cannot create an object of type 'Test.Data.IEntityProvider`2[[Test.Entities.Articles, Test.Entities, Version=1.0.1.0, Culture=neutral, PublicKeyToken=null],[Test.Entities.ArticlesKey, Test.Entities, Version=1.0.1.0, Culture=neutral, PublicKeyToken=null]]' from its string representation '' for the 'Provider' property. Funny thing is that in markup there are only a few (properties) wich i defined! If anyone could drop me a hint on this i´d be very thankfull. See you,
    • Post Points: 35
  • 08-31-2007 2:02 AM In reply to

    • swin
    • Top 10 Contributor
    • Joined on 06-14-2006
    • London, UK
    • Posts 922
    • Points 34,710

    Re: EntityDataSource's Provider="" Keeps appearing automatically

    Have you tried generating the sample website? does it work ok?

     Perhaps you could post your code.

    hth

    swin 

    ------------------------------------------------- Member of the .NetTiers team -------------------------------------------------
    • Post Points: 35
  • 08-31-2007 6:49 AM In reply to

    Re: EntityDataSource's Provider="" Keeps appearing automatically

    Yes, im currently working with the sample website, adding functionality i need. Is the problem im using ajax's tabcontainer?

    I dont have access to the code right now (im out), but as soon i can (a few hours) i'll post the code.

     

    thankx for replying!

    • Post Points: 35
  • 08-31-2007 6:58 AM In reply to

    • swin
    • Top 10 Contributor
    • Joined on 06-14-2006
    • London, UK
    • Posts 922
    • Points 34,710

    Re: EntityDataSource's Provider="" Keeps appearing automatically

     try your sample without ajax to see if its to do with the tabcontainer.

    hth

    swin 

    ------------------------------------------------- Member of the .NetTiers team -------------------------------------------------
    • Post Points: 35
  • 09-22-2007 5:20 PM In reply to

    • ConwayDean
    • Not Ranked
    • Joined on 06-15-2006
    • Canberra, Australia
    • Posts 5
    • Points 85

    Re: EntityDataSource's Provider="" Keeps appearing automatically

    I am suffering the same issue. Here is my setup:

    Error:

    Error 1 Cannot create an object of type 'TRIP.Data.IEntityProvider`2[[TRIP.Entities.BaseCheckListItem, TRIP.Entities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[TRIP.Entities.BaseCheckListItemKey, TRIP.Entities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' from its string representation '' for the 'Provider' property. E:\Repositories\DECS_Outdoor_Activities\src\System\TripAdmin\refdata\BaseCheckListItems.aspx 28 

    ASPX:

    <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="BaseCheckListItems.aspx.cs" Inherits="refdata_BaseCheckListItems" Title="Base Check List Items" StylesheetTheme="Default" %>

    <%@ Register Assembly="TRIP.Web" Namespace="TRIP.Web.Data" TagPrefix="cc1" %>

    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">

    Base Check List Items

    </asp:Content>

    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <asp:GridView ID="grdItems" runat="server" AutoGenerateColumns="False" BackColor="White"

    BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black"

    GridLines="Vertical" Width="100%" AutoGenerateDeleteButton="True" AutoGenerateEditButton="True" OnRowEditing="grdItems_RowEditing" DataSourceID="BaseCheckListItemDataSource1">

    <FooterStyle BackColor="#CCCC99" />

    <Columns>

    <asp:TemplateField HeaderText="Check List Item Description">

    <EditItemTemplate>

    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("CheckListItem") %>'></asp:TextBox>

    </EditItemTemplate>

    <ItemTemplate>

    <asp:Label ID="Label1" runat="server" Text='<%# Bind("CheckListItem") %>'></asp:Label>

    </ItemTemplate>

    </asp:TemplateField>

    </Columns>

    <RowStyle BackColor="#F7F7DE" />

    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />

    <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />

    <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />

    <AlternatingRowStyle BackColor="White" />

    </asp:GridView>

    <cc1:BaseCheckListItemDataSource ID="BaseCheckListItemDataSource1" runat="server"

    CacheDuration="30" CustomMethodRecordCountParamName="" EnableCaching="False" EnableDeepLoad="False"

    EnablePaging="False" EnableRecursiveDeepLoad="False" EnableSorting="False" EnableTransaction="True"

    Filter="" InsertMethod="Insert" Provider="" SelectMethod="GetAll" Sort="" UpdateMethod="Update">

    <DeepLoadProperties Method="IncludeChildren" Recursive="False">

    </DeepLoadProperties>

    </cc1:BaseCheckListItemDataSource>

     

    </asp:Content>

    My next task is to run this on a page not linked to a Master Page and see if that fails too. 

     

    • Post Points: 5
  • 09-22-2007 5:28 PM In reply to

    • ConwayDean
    • Not Ranked
    • Joined on 06-15-2006
    • Canberra, Australia
    • Posts 5
    • Points 85

    Re: EntityDataSource's Provider="" Keeps appearing automatically

    Ok, after rummaging around and reading other posts:

    http://community.codesmithtools.com/forums/p/4853/19557.aspx#19557 

     I can see that we are not supposed to set the Provider property, It is exposed as a public property and the drag & drop operation puts all public properties into the markup.

    Resolution:

    simply remove the provider attribute and it works well.

    • Post Points: 35
  • 09-22-2007 11:41 PM In reply to

    • bgjohnso
    • Top 10 Contributor
    • Joined on 09-15-2005
    • Spokane, WA
    • Posts 764
    • Points 22,530

    Re: EntityDataSource's Provider="" Keeps appearing automatically

    I think we could just add the ToolboxData attribute to the DataSource controls and that way we can control the markup that gets created when they are dropped on the design surface.

    [ToolboxData("<{0}:XXXDataSource ID=\"XXXDataSource\" runat=\"server\" EnableTransactions=\"true\"  > </{0}:XXXDataSource>")]

    I haven't tested this, but I think it would work.  We just need to decide which properties should get added automatically.

    Ben Johnson
    ------------------------------
     Member of the .NetTiers team
     Visit http://www.nettiers.com
    ------------------------------

    • Post Points: 35
  • 07-01-2008 10:19 AM In reply to

    Re: EntityDataSource's Provider="" Keeps appearing automatically

    I am still encountering this error when using the <data: controls in a wizard. Has your solution been tested and proven, if so please provide a method to implement the work around.

    regards,

    Cliff

    • Post Points: 35
  • 07-03-2008 6:51 AM In reply to

    • blake05
    • Top 25 Contributor
    • Joined on 04-03-2008
    • Wisconsin
    • Posts 331
    • Points 5,860

    Re: EntityDataSource's Provider="" Keeps appearing automatically

    Hey Cliff,

    I didn't see that solution above in the template anywhere. If you want to add it to EntityDataSouce.cst and test it out. Let me know the results and I'll get it added to core :).

    Thanks

    -Blake Niemyjski

    Blake Niemyjski

    CodeSmith Tools, LLC Support Specialist

    Blog: http://windowscoding.com/blogs/blake/

    ----------------------------------------------------------------------
     Member of the .NetTiers team | Visit http://www.nettiers.com
    ----------------------------------------------------------------------

    • Post Points: 5
Page 1 of 1 (9 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems