This is a weird issue. I have a List view with 2 Link buttons. "Edit" and "Delete" Iam able to attach an event handler for the first linkbutton(Update). Code in the event handler executed fine. But If I try to attach a event handler for the second link button(Delete) , I get an error.
My Item Template Looks like this.
<ItemTemplate>
<tr>
<td>
<asp:Label ID="MessageLabel" runat="server" Text='<%# Eval("Item") %>' />
</td>
<td>
<asp:Label ID="URLLabel" runat="server" Text='<%# Eval("URL") %>' />
</td>
<td>
<asp:LinkButton ID="EditLinkButton" runat="server" OnClick="EditLinkButtonClicked"
CommandArgument='<%# Eval("ItemID") %>'> Edit</asp:LinkButton>
</td>
<td>
<asp:LinkButton ID="DeleteLinkButton" runat="server" OnClick="DeleteLinkButtonClicked"
CommandArgument='<%# Eval("ItemID") %>'>Delete</asp:LinkButton>
</td>
</tr>
</ItemTemplate>
The Event handler declared in the codebehind file are
public void EditLinkButtonClicked(object sender, EventArgs e) { ----- }
public void DeleteLinkButtonClicked(object sender, EventArgs e) { ----- } [Exactly same]
First Item works absolutely fine. But If I attach the second handler, I get the following error
Am I missing some thing ? Note - There is no error if I try to attach the 1st event handler to the second link button.[ie EditLinkButtonClicked to DeleteLinkButtonClicked ] Issue occurs only when I try to attach DeleteLinkButtonClicked to DeleteLinkButton
Any help? Thanks in Advance