C
craigkenisston
In Asp.Net 2.0 I need to create a very special layout with data coming
from an ObjectDataSource.
It was already working using a GridView, but I need a free layout.
So, I dropped the GridView and added something like this:
So, I'm trying something like :
<div>
<table>
<tr>
<td>
Referring URL:</td>
<td>
<asp:label id="lblReferringURL" runat="server"
text='<%# DataBinder.Eval(ObjectDataSource1, "CTRY_CODE") %>'>
</asp:label>
</td>
</tr>
<tr>
<td>
Entry Page:</td>
<td>
<asp:label id="lblEntryPage" runat="server" text='<%#
DataBinder.Eval(ObjectDataSource1, "STAT_CODE") %>'></asp:label>
</td>
</tr>
</table>
</div>
Then I used Page.DataBind() in code behind.
I got errors telling me that there are no objects "CTRY_CODE" or
"STAT_CODE" in ObjectDataSource1.
What's the proper way to do this ?
from an ObjectDataSource.
It was already working using a GridView, but I need a free layout.
So, I dropped the GridView and added something like this:
So, I'm trying something like :
<div>
<table>
<tr>
<td>
Referring URL:</td>
<td>
<asp:label id="lblReferringURL" runat="server"
text='<%# DataBinder.Eval(ObjectDataSource1, "CTRY_CODE") %>'>
</asp:label>
</td>
</tr>
<tr>
<td>
Entry Page:</td>
<td>
<asp:label id="lblEntryPage" runat="server" text='<%#
DataBinder.Eval(ObjectDataSource1, "STAT_CODE") %>'></asp:label>
</td>
</tr>
</table>
</div>
Then I used Page.DataBind() in code behind.
I got errors telling me that there are no objects "CTRY_CODE" or
"STAT_CODE" in ObjectDataSource1.
What's the proper way to do this ?