in

Platinum Bay

Peace, Love, and...

This Blog

Syndication


.NETicated

No default member found for type [Type Name]

For the majority of this site, I had been using databinding to DataLists, using generic lists, and the default syntax:

<%# DataBinder.Eval(Container.DataItem, "PhotoID") %>

However, when I tried using the same syntax for a FormView in conjunction with a ObjectDataSource, I got the title message. It turned out to be simple to resolve:

<%# Eval("PhotoID") %>

I believe it may have to do with how the data is being retrieved.

Published Jan 01 2007, 09:22 PM by Steve
Filed under:

Comments

July 22, 2009 7:22 AM

try <%#(Container.DataItem).PhotoID%>

hrlp
 

Leave a Comment

(required )  
(optional )
(required )  
Add

About Steve

Steve Andrews is an independent consultant, INETA speaker, and Microsoft MVP for Visual Studio ALM. He has been working in technology for over ten years focusing on custom application development and Application Lifecycle Management. Steve is also Microsoft and IBM certified and a community fanatic having led sessions at nearly 100 events across North America. When he's not developing software solutions or engaging with the community about software technology, Steve is a closet singer and songwriter and plays the guitar and keys. Occasionally, Steve even gets to sleep. Occasionally.
Powered by Community Server (Commercial Edition), by Telligent Systems
© Platinum Bay | Some Rights Reserved Creative Commons License

Disclaimer: The information in this weblog is provided "AS IS" with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion. Feel free to challenge me, disagree with me, or tell me I'm completely nuts in the comments section of each blog entry, but I reserve the right to delete any comment for any reason whatsoever (abusive, profane, rude, or annonymous comments) - so keep it polite, please.