[SOLVED] Server tag is not well formed error on datagrid row ImageButton

Issue

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>

Solution

Replace

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

with

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

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

Answered By – navylover

Answer Checked By – Gilberto Lyons (BugsFixing Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *