Click here to Skip to main content
11,709,220 members (49,191 online)
Rate this: bad
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 3:56am
Edited 13-Feb-13 5:55am
richcb at 13-Feb-13 9:59am
Your error message shows CreateddDate. It contains an extra "d". Remove that d and see what happens.
Sandeep Mewara at 13-Feb-13 11:51am
subodhrastogi24 at 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 at 13-Feb-13 12:21pm
You need to find appropriate name of field.
subodhrastogi24 at 13-Feb-13 23:41pm
field name is same as in Table
Kiran Susarla at 14-Feb-13 2:09am
Can you please paste your select query or the datasource object definition?
subodhrastogi24 at 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 at 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
0 Sergey Alexandrovich Kryukov 580
1 OriginalGriff 250
2 Maciej Los 225
3 Peter Leow 219
4 Mika Wendelius 160
0 OriginalGriff 9,428
1 Sergey Alexandrovich Kryukov 9,027
2 CPallini 5,189
3 Maciej Los 4,991
4 Mika Wendelius 3,856

Advertise | Privacy | Mobile
Web03 | 2.8.150819.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