View Single Post
  #3 (permalink)  
Old July 30th, 2012, 12:03 PM
sophia sophia is offline
Friend of Wrox
Points: 1,469, Level: 15
Points: 1,469, Level: 15 Points: 1,469, Level: 15 Points: 1,469, Level: 15
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Oct 2009
Posts: 341
Thanks: 14
Thanked 3 Times in 3 Posts

Hi, I am getting error "For the EntityDataSource, either Type or DbType (but not both) must be specified for each Parameter."

If I type DbType="Guid" then I get another error "'DailyCollection' is not a member of type 'ASPNETDBModel.DailyCollection' in the currently loaded schemas. Near simple identifier, line 6, column 4."

Please tell me what is the issue?
I am using this code.

<asp:EntityDataSource ID="EntityDataSource1" runat="server" 
        DefaultContainerName="ASPNETDBEntities" EnableDelete="True" 
        EnableFlattening="False" EnableInsert="True" EnableUpdate="True" 
        EntitySetName="Clients" oninserting="EntityDataSource1_Inserting" 
        EntityTypeFilter="" Select="" Where="it.DailyCollection.UserId=@userId">
                <asp:SessionParameter Name="userId" SessionField="UserID" DbType="Guid" />
And code behind's Page_Load is

protected void Page_Load(object sender, EventArgs e)
        Session["UserID"] = Membership.GetUser().ProviderUserKey;
Reply With Quote