Click here to Skip to main content
11,935,053 members (55,254 online)
Rate this:
Please Sign up or sign in to vote.

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

where "CreatedDate" of "DateTime" datatype column of in sqlserver table

and aspx page code is ----
<asp:GridView ID="Grid_PostedJobs" runat="server" AutoGenerateColumns="False" Height="175px" Width="673px" DataKeyNames="Job_Id"  >
    <asp:TemplateField HeaderText="Posted Date" Visible="true">
          <asp:Label ID="lbl_Date" runat="server" Text='<%#
                 Bind("CreatedDate", "{0:M-dd-yyyy}")%>'>
Posted 13-Feb-13 4:56am
Edited 13-Feb-13 6:55am
richcb 13-Feb-13 9:59am
Your error message shows CreateddDate. It contains an extra "d". Remove that d and see what happens.
Sandeep Mewara 13-Feb-13 11:51am
subodhrastogi24 13-Feb-13 11:53am
It is still showing the same error---- richcb
DataBinding: 'System.Data.Common.DataRecordInternal' does not contain a property with the name 'CreatedDate'.
Maciej Los 13-Feb-13 12:21pm
You need to find appropriate name of field.
subodhrastogi24 13-Feb-13 23:41pm
field name is same as in Table
Kiran Susarla 14-Feb-13 2:09am
Can you please paste your select query or the datasource object definition?
subodhrastogi24 14-Feb-13 2:42am
cmd.CommandText = "select CreatedDate 'Posted Date' ,JobTitle,Location,Job_Id,Category from JobForm ";

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I think you have renamed your CreatedDate column with 'PostedDate' as shown your Select query which you have posted here:
cmd.CommandText = "select CreatedDate 'PostedDate' ,JobTitle,Location,Job_Id,Category from JobForm ";

If this this the right query then you have to use 'PostedDate' on Data Bind method instead of 'CreatedDate'
subodhrastogi24 18-Feb-13 4:00am
thanks MDubey87

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web04 | 2.8.151126.1 | Last Updated 15 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100