0

I´m having some wierd issus with my asp:Linkbutton functionality in my asp:ListView. Here is my code:

 <asp:ListView ID="lvData" runat="server" OnItemCommand="lvData_ItemCommand" OnItemDataBound="lvData_ItemDataBound">
    <LayoutTemplate>... </LayoutTemplate>
    <ItemTemplate>
    ...
    <td>
      <asp:LinkButton ID="ItemLink" runat="server" CommandName="View" Text='<%# Eval("NameOfBatch")%>'></asp:LinkButton>
    </td>
    ...

my code-behind is like this:

    protected void lvData_ItemCommand(object sender, ListViewCommandEventArgs e)
{    
    string smu = "";
}

if I put a breakpoint on string smu it never goes there. The only thing that happens is that my table dissapears and nothing else.

Do you have any ideas ?

tingason
  • 133
  • 1
  • 2
  • 12

1 Answers1

0

Set the CausesValidation property to false on the controls if you have validation on the form and don't want them to trigger the validation.

Pushpendra
  • 814
  • 1
  • 6
  • 17
  • For more help visit the link with same type of question http://stackoverflow.com/questions/2022734/listview-fields-not-getting-posted – Pushpendra Sep 20 '12 at 16:23