title: ASP.NET Listview->Click Row->Perform action
body: <p>I need some help with the following.</p>
  
  <p>I have a list view that I fill with code-behind:</p>
  
  <p>Linq->Sql:</p>
  
  <pre><code>        ListView1.DataSource = from x in database.ITEMS
                                 select x;
          ListView1.DataBind();
  </code></pre>
  
  <p>Content of ITEMS:</p>
  
  <ul>
  <li>ID</li>
  <li>Name</li>
  <li>Quantity</li>
  </ul>
  
  <p>I only show the name of the fields:</p>
  
  <pre><code>        &lt;tr&gt;
              &lt;td&gt;
                  &lt;asp:Label ID="nameLabel" runat="server" Text='&lt;%# Eval("Name") %&gt;' /&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
  </code></pre>
  
  <p>Assuming I have 25 rows in the database, I fill the list view with 25 rows. Next is what I need help with. The user needs to click one of the 25 names (complete row) and redirects to a page where the content of that row is showed. So lets say someone clicks on "Cars", he'll be redirected and he will see: You have selected Cars, Cars has an ID of 19 and a Quantity of 6.</p>
  
  <p>I have browsed the Internet already but I am having trouble finding solutions that I can understand. I am kind of a noob when it comes to list views and other data displaying methods. </p>
  
  <p>My 2 questions:</p>
  
  <ol>
  <li><strong>How do I start a event when I click a row (and not a button or a link in that row)?</strong></li>
  <li><strong>When I click a row and start a event, how can I check which one was clicked?</strong></li>
  </ol>
  
  <p>I hope someone can explain to me how this is done in a user friendly noob kind of way or redirect me to a tutorial discussing my issue's and also in a user friendly way. Thanks in advance.</p>