Home > Back-end >  Server tag is not well formed error on datagrid row ImageButton
Server tag is not well formed error on datagrid row ImageButton

Time:02-11

I have come to an issue like the server tag is not well. this code is ASP.NET C# code.

<asp:TemplateColumn HeaderText="Options">
        <ItemTemplate>
            <asp:ImageButton ID="imgbuttEditVendor" runat="server" CommandName="Edit" CommandArgument="<%# Eval("ctpv_id") %>" ImageUrl="~/images/buttons/edit.gif" />                
        </ItemTemplate>
    </asp:TemplateColumn>

CodePudding user response:

Replace

CommandArgument="<%# Eval("ctpv_id") %>"

with

CommandArgument='<%# Eval("ctpv_id") %>'

Note: Embed double quote in the double quote is not allowed.

  • Related