jquery ui - asp.net mvc 4 Delete dialog box opens only on first item -


i have listing page in partial view. each list, have edit , delete links open jquery dialog box edit/delete data. however, dialog box opens on first item , not working rest of list.

what missing doing?

partial view listing

>foreach (var item in model) { >   <tr> >       <td> >           @html.displayfor(modelitem => item.reportname) >       </td> >       <td> >           @html.displayfor(modelitem => item.note) >       </td> >       <td class="icon"><a id="editreportlink" href="#" title="edit note"><img src="~/content/_images/icon_edit.png" /></a></td> >       <td class="icon"><a id="deletereportlink" href="#" title="delete thread"><img src="~/content/_images/icon_delete.png" /></a></td> >   </tr> >} 

jquery function

$("#delete-button").dialog({         autoopen: false,         height: "auto",         width: "auto",         modal: true,         resizable: false,     });      $("#deletereportlink").click(function () {         alert("test");         $("#delete-button").dialog("open");     }); 

not sure if figured out had same problem , first answer here helped me fix it.

mvc3 - first row link works jquery modal dialog


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -