PC Review


Reply
Thread Tools Rate Thread

Databinding expressions are only supported on objects that have a

 
 
=?Utf-8?B?ZGJhMTIz?=
Guest
Posts: n/a
 
      29th Aug 2006
In my GridView I have this:

<Columns>
<asp:TemplateField HeaderText="Title"
SortExpression='<%#((Podcast)Container.DataItem).Title %>'>
<ItemTemplate>
<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 />
</ItemTemplate>
</asp:TemplateField>
</Columns>

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

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).Title %>'>
Line 33: <ItemTemplate>
Line 34: <asp:Image ID="Image1"


--
dba123
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Databinding expressions are only supported on objects that have a DataBinding event jobs Microsoft ASP .NET 0 26th Sep 2007 12:54 AM
Concatenating two databinding expressions - how?? sydney.luu@gmail.com Microsoft ASP .NET 4 29th Mar 2006 03:02 PM
'&' in DataBinding expressions Vik Microsoft ASP .NET 1 21st Apr 2004 05:31 PM
Databinding Expressions? Chike J. Okor Microsoft Dot NET 1 8th Oct 2003 09:09 AM
Databinding Expressions? Chike J. Okor Microsoft Dot NET Framework Forms 1 8th Oct 2003 09:09 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:06 PM.