newbie: configuring template column

J

Jeff

hey

asp.net 2.0

I'm trying to specify a template column for my GridView, but I get a compile
error:
Validation (XHTML 1.0 Transitional): Element 'itemtemplate' is not
supported.

<columns>
<asp:ButtonField headertext="Occupation" commandname="Occupation"
datatextfield="Occupation" />
<asp:ButtonField headertext="Country" commandcame="Country" />
<asp:templatefield headertext="User Name">
<itemtemplate>
<asp:label id="firstname" text='<%# Eval("FirstName") %>'
runat="server" />
<asp:label id="lastname" text='<%# Eval("LastName") %>' runat="server"
/>
</itemtemplate>
</asp:templatefield>
</columns>

Any suggestions?
 
D

David Wier

Show us the rest of your Gridview tag - -
also - are you sure you're running 2.0 on the server?
 
J

Jeff

Thank you!

I've been able to solve this now, the error was that I was using nested
master pages. I get a red line beneath every word I enter in the
ContentPlaceHolder in my nested master page. Even if I drop a server control
onto the ContentPlaceHolder, the control's ID isn't added - I have to do
that manually... So I thought if I replaced the nested master page, with a
complete master page, maybe it would solve the problem.. It sure did...

Jeff
 

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

Top