By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,677 Members | 1,076 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,677 IT Pros & Developers. It's quick & easy.

Databinding expressions are only supported on objects that have a

P: n/a
In my GridView I have this:

<asp:TemplateField HeaderText="Title"
SortExpression='<%#((Podcast)Container.DataItem).T itle %>'>
<asp:Image ID="Image1"
ImageUrl="~/images/interact/icon_podcast.gif" runat="server" />
<asp:HyperLink ID="Title" runat="server"
Text='<%#((Podcast)Container.DataItem).Title %>'
NavigateUrl='<%#((Podcast)Container.DataItem).URL %>' />
<br /><br />
<asp:Label ID="Description" runat="server"
Text='<%#((Podcast)Container.DataItem).Description %>'></asp:Label>
<br /><br />

I get this error that's been driving me nuts all afternoon, what a waste of

Parser Error
Description: An error occurred during the parsing of a resource required to
service this request. Please review the following specific parse error
details and modify your source file appropriately.

Parser Error Message: Databinding expressions are only supported on objects
that have a DataBinding event. System.Web.UI.WebControls.TemplateField does
not have a DataBinding event.

Source Error:
Line 30:
Line 31: <Columns>
Line 32: <asp:TemplateField HeaderText="Title"
SortExpression='<%#((Podcast)Container.DataItem).T itle %>'>
Line 33: <ItemTemplate>
Line 34: <asp:Image ID="Image1"
Aug 29 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.