title: Identify a particular row in dynamic partial view using JQuery
body: <p>I have a partial view which is not strongly typed. it is dynamic:</p>
  
  <pre><code>&lt;%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl&lt;dynamic&gt;" %&gt;
  
  &lt;%@ Import Namespace="Student.Models" %&gt;
  
  &lt;div&gt;
  &lt;table id="TA"&gt;
          &lt;tr&gt;
              &lt;th&gt;Teaching Assistant&lt;/th&gt;
              &lt;th&gt;Course ID&lt;/th&gt;
              &lt;th&gt;Day&lt;/th&gt;
              &lt;th&gt;Delete Row&lt;/th&gt;
          &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/div&gt;
  
  &lt;div&gt;
  &lt;table id="StudentAction"&gt;
      &lt;tr&gt;
         &lt;td&gt;&lt;select name="TeachingAssistant"&gt;&lt;/select&gt; &lt;/td&gt;
         &lt;td&gt;&lt;select name="CourseID"&gt;&lt;/select&gt;&lt;/td&gt;
         &lt;td&gt;&lt;select name="Day"&gt;&lt;/select&gt;&lt;/td&gt;
         &lt;td&gt;&lt;input name="delete" type="image" src="/delete.png"  onclick="javascript:delete('this')"/&gt;&lt;/td&gt;
     &lt;/tr&gt;
  
  &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Now I add a new row using JQuery every time a new value is selected from "TeachingAssistant" select list. </p>
  
  <p>Also, there is a delete image which on click should delete that particular row. How can I identify a particular row based on the delete image clicked? For e.g if the delete image for row third is clicked then how can I identify third row and send that to JQuery? For e.g. I want to identify the row on which the delete image was clicked and send it to delete function in JQuery below, using "this" does not work, is there any other way to doing this? again this is not a strongly typed view, its dynamic. </p>
  
  <pre><code>function delete(val) {
  
      $(this).parent().remove();
  
  }
  </code></pre>
  
  <p>Any help would be appreciated.</p>