Results 1 to 18 of 18

Thread: call code-behind method from markup

Threaded View

  1. #1

    Thread Starter
    Fanatic Member ZeBula8's Avatar
    Join Date
    Oct 2002
    Posts
    548

    Resolved call code-behind method from markup

    How do I call a code-behind method from my markup?
    I want to call this method in the OnClick event as shown below: AddRow()


    Code:
     <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Button ID="AddButton" runat="server" Text="Add" OnClick='<%#AddRow()%>' />
                    </HeaderTemplate>
                    <ItemStyle  HorizontalAlign="Center" />
                    <ItemTemplate>
                        <asp:LinkButton ID="DeleteLinkButton" runat="server" CausesValidation="False" CommandArgument='<%# Container.DataItemIndex %>'
                            CommandName="Delete" Text="Delete"></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
    Last edited by ZeBula8; Jun 22nd, 2007 at 06:49 PM. Reason: RESOLVED

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width