The code below fails, but I cannot see why. In debug mode, the data is all present and correct in my dataset, but all other fields in my html work.
can anyone see whats up ?
My Query is
my offending html is
I can look at the colums attribute of my datatable, and there is a column called curRate in there.
But when I execure the code, I get an error at the HTML
The Error says
DataBinder.Eval: 'System.Data.Common.DbDataRecord' does not contain a property with the name curRate.
This is doing my head in, please someone help me so I can go home and get to the pub before it closes !
K
can anyone see whats up ?
My Query is
Code:
string strCommand = "Select r.pkRoom, r.nRoomNumber, r.strRoomName, rate.curRate, r.nSleeps,r.strDescription, ";
strCommand += "r.blEnsuite, r.blDisabled, r.strType from ";
strCommand+= "tblRooms r join tblRates rate on r.nRate = rate.pkRate";
my offending html is
Code:
<ItemTemplate>
<asp:Label id="curRate" Runat="server" text='<% DataBinder.Eval(Container,"DataItem.curRate") %>'/>
</ItemTemplate>
I can look at the colums attribute of my datatable, and there is a column called curRate in there.
But when I execure the code, I get an error at the HTML
The Error says
DataBinder.Eval: 'System.Data.Common.DbDataRecord' does not contain a property with the name curRate.
This is doing my head in, please someone help me so I can go home and get to the pub before it closes !
K