Click here to Skip to main content
15,885,875 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using Datalist for Databing purpose - but i get another fields correctly in database but below one field error please help any how to solve this error, i am using correct database name in databind fields blow label but error is came, how to solve this error any one help to me.

<asp:Label ID="lblDescription" runat="server" Text='<%# Eval("Description") %>' Font-Italic="true">


Error Message
DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'Description'.
Posted
Comments
Richard Deeming 21-Aug-15 11:52am    
The error message is quite clear - the data source you are binding to doesn't contain a field called "Description".

To fix the error, either add the missing field to your data source, or correct the field name in the Eval block.
j snooze 21-Aug-15 17:00pm    
if you can completely verify by running the sql on the database side that the field description with EXACT spelling is coming through from the EXACT sql your code is running then make sure if its a stored proc or something that you have "Set nocount on" at the beginning of your SQL. If multiple statements are being run this can mess up what is returned.

1 solution

Check for following things
1- Do you really returning 'Description' column from database?
2- re-check spellings
3- Make sure you are not using any alias in DB query or renaming column name in your code
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900