ASP.NET 2.0 DataView DetailsView ImageField displaying images from

W

whyman

I have read several documents that use Imagefield and DataField in the
examples in Visual Studio 2005. I am new to Visual Studio, so I am going
through tutorials, and code I find from the internet. Code from Microsofts
site below.

<asp:GridView ID="GridView1"
DataSourceID="ProductsSource"
AutoGenerateColumns="false"
Runat="Server">
<Columns>
<asp:BoundField
DataField="LastName"
NullDisplayText="no value" />
<asp:ImageField HeaderText="" DataField="photo" />
</Columns>
</asp:GridView>

When I try to use the ImageField in this manner I receive an error.
(Validation (ASP.Net): Attribute 'DataField' is not a valid attribute of
element 'ImageField'.) I receive the same error from a detailsview as well.
Has this been taken out of ASP.NET 2.0 or am I missing somthing that I do not
understand?

Thank you for any help you can give
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top