title: ASP.NET MVC ajax pagination with partial view
body: <p>I have a search page which uses a simple ajax request to get new search results from the controller.</p>
  
  <p>The controller returns the results as rendered html, so all the client script has to do is $('#results').html(data);</p>
  
  <p>The html also contains paginated links.</p>
  
  <p>I want to add click handlers to these paginated links inside the ajax success event handler, but I find it kind of icky to be getting the page number from the A's text property.. hypothetically, the links could read "Page 1", "Page 2", and then i'd be parsing text.</p>
  
  <p>Am I doing this wrong? </p>
  
  <p>Should I be generating the ajax links inside the partial view instead?</p>