Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8344541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:24:21+00:00 2026-06-09T06:24:21+00:00

I have a partial view which is not strongly typed. it is dynamic: <%@

  • 0

I have a partial view which is not strongly typed. it is dynamic:

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>

<%@ Import Namespace="Student.Models" %>

<div>
<table id="TA">
        <tr>
            <th>Teaching Assistant</th>
            <th>Course ID</th>
            <th>Day</th>
            <th>Delete Row</th>
        </tr>
</table>
</div>

<div>
<table id="StudentAction">
    <tr>
       <td><select name="TeachingAssistant"></select> </td>
       <td><select name="CourseID"></select></td>
       <td><select name="Day"></select></td>
       <td><input name="delete" type="image" src="/delete.png"  onclick="javascript:delete('this')"/></td>
   </tr>

</table>
</div>

Now I add a new row using JQuery every time a new value is selected from “TeachingAssistant” select list.

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.

function delete(val) {

    $(this).parent().remove();

}

Any help would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T06:24:22+00:00Added an answer on June 9, 2026 at 6:24 am

    Add some class to trigger the event.

    <td><input name="delete" type="image" src="/delete.png" class="delete"/></td>
    

    Then use closest to get its row.

    $('#StudentAction').on('click', '.delete', function() {
        $(this).closest('tr').remove();
    });
    

    demo

    or for old versions:

    $('#StudentAction .delete').live('click', function() {
        $(this).closest('tr').remove();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a strongly typed partial view which is giving me Object reference not
I have a partial view which contain JavaScript and Ajax, but does not run
I am using ASP.Net MVC. I have a partial view which has a form
'm using ASP.NET MVC 3 with Razor views. I have a partial view which
I have a partial view which is displayed on the top right of every
I have a view Details which consists of a partial view _Tabs and a
Hi guys i have controller which returns a partial view, the controller is called
I have a partial view (user control) that is shared by my Create and
I have a partial view which renders a table. On page load, I am
I am working on ASP.NET MVC3. I have a partial view RestaurantAdminNavigation.ascx which i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.