javascript - Bootstrap Modal Popup with Linq & Every time clicked on triggered should go on Controller -


my action in controller:

public actionresult profile1(string id) { string currentuserid = user.identity.getuserid(); var = u in db.users join s in db.designations on new { id = u.designationid } equals new { id = s.designationid } u.id == id select new viewemployees { employeecode = u.username, employeename = u.name, father_name = u.father_name, designationname = s.designationname, employeetype = u.employeetype, email = u.email, mobile = u.mobile };  return partialview("profile1", us); } 

my view whre want show data in modal popup...

foreach(var item in model) {  <td> <a data-target ="#mymodal" data-toggle="modal">@item.employeename</a> <div class="modal fade" id="mymodal" tabindex="-1" role="dialog" aria-labelledby="mymodallabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <h4 class="modal-title" id="mymodallabel">modal title</h4> </div> <div class="modal-body"> @html.action("profile1", "attendance", new {id=item.employeeid }) </div> <div class="modal-footer"> <p>&copy; @datetime.now.year - al-khidmat foundation</p> </div> </div> </div> </div> </td> } 

when user click on employee name list of employees should show profile of employee whoose name clicked...!


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -