MammaDiGrenie'
MammaDiGrenie'

Reputation: 97

Server tag not well formed. Why?

I keep getting the parser error message:

The server tag is not well formed.

But to me it looks fine:

<asp:Button ID="seat" CommandArgument="<%#(Eval("SeatName"))%>"    
     CommandName="takeSeat" Text="<%#(Eval("SeatName"))%>" runat="server" />

Upvotes: 1

Views: 35

Answers (1)

MammaDiGrenie&#39;
MammaDiGrenie&#39;

Reputation: 97

When using <% whatever %> you have to use the single (' not ") '<% whatever %>' and NOT "<% whatever %>".

So

<asp:Button ID="seat" CommandArgument='<%#(Eval("SeatName"))%>'     CommandName="takeSeat" Text='<%#(Eval("SeatName"))%>' runat="server" />

Upvotes: 1

Related Questions