locked
desperately need help on a custom grid view. Returning error. RRS feed

  • Question

  • User-784604937 posted
    I desperately need help on the following code. I have an asp custom grid view and following code represents one of the first columns in the grid view. Can anyone please find any syntax error in the following code? I really need help on this. Thanks in advance! Syed                 <asp:TemplateField HeaderText="Customer Number">                     <ItemTemplate>                         <asp:Button ID="btn_CUSTOMER_NUMBER" runat="server" CommandArgument='<%#Eval("CUSTOMER_NUMBER") %>'                              Text=' <%#Eval("CUSTOMER_NUMBER") %> ' OnClick="ShowCustomer_Onclick" Visible=true  />                     </ItemTemplate>                 </asp:TemplateField>
    Wednesday, June 22, 2011 3:02 AM

Answers

  • User-693248168 posted

    This looks fien to me. Let us know if you are facing any code error.

    <asp:TemplateField HeaderText="Customer Number">
                        <ItemTemplate>
                            <asp:Button ID="btn_CUSTOMER_NUMBER" runat="server" CommandArgument='<%#Eval("CUSTOMER_NUMBER") %>'
                                Text=' <%#Eval("CUSTOMER_NUMBER") %> ' OnClick="ShowCustomer_Onclick" Visible="true" />
                        </ItemTemplate>
                    </asp:TemplateField>
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, June 22, 2011 3:37 AM

All replies

  • User-693248168 posted

    This looks fien to me. Let us know if you are facing any code error.

    <asp:TemplateField HeaderText="Customer Number">
                        <ItemTemplate>
                            <asp:Button ID="btn_CUSTOMER_NUMBER" runat="server" CommandArgument='<%#Eval("CUSTOMER_NUMBER") %>'
                                Text=' <%#Eval("CUSTOMER_NUMBER") %> ' OnClick="ShowCustomer_Onclick" Visible="true" />
                        </ItemTemplate>
                    </asp:TemplateField>
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, June 22, 2011 3:37 AM
  • User3866881 posted

    Hello Sislam123:)

    What problem have you got?

    And Please make sure that your "CUSTOMER_NUMBER" is really a columnName that does exist in the data-binded db.

    Thx

    Thursday, June 23, 2011 10:33 PM