asp.net - MVC error in javascript code -


I want to delete employee records using the post method. I changed the HTML. With theNumberlink button I want to prompt the user shortly for confirmation before deleting the record.
I have written the following code:

  & lt; Input value = "delete" type = "submit" onclick = "return confirm ('Are you sure to delete the id = @ item.EmpId');" />  

This row is showing error " unterminated string constant ", what is wrong with this code?

My complete view code

  & lt; Table range = "1" & gt; & Lt; TR & gt; & Lt; Th & gt; @ Html.DisplayNameFor (model = & gt; model.Name) & lt; / Th & gt; & Lt; Th & gt; @ Html.DisplayNameFor (model => model. Gender) & lt; / Th & gt; & Lt; Th & gt; @ Html.DisplayNameFor (model => model.City) & lt; / Th & gt; & Lt; Th & gt; @ Html.DisplayNameFor (model = & gt; model.DID) & lt; / Th & gt; & Lt; Th & gt; Action & lt; / Th & gt; & Lt; / TR & gt; @foreach (different items in the model) {use (htmlbizoform ("remove", "employee", new {id = item.mpid})) {& lt; Tr & gt; & Lt; TD & gt; @html DisplayFor (Model Isthm = & gt; Item Names) & lt; / Td> & Lt; TD & gt; @html Displayer (model istam => item. Gender) & lt; / Td> & Lt; TD & gt; @html DisplayForm (ModelItem => item.city) & lt; / Td> & Lt; TD & gt; @html DisplayForm (ModelItem => item.did) & lt; / Td> & Lt; TD & gt; @HTMLconnect ("edit", "edit", new id / iitum.mmpid}). @ Html.ActionLink ("Details", "Description", new {id = item.EmpId}). & Lt; Input value = "delete" type = "submit" onclick = "confirm return ('do you really want to delete the id = @ item.EmpId');" /> & Lt; / TD & gt; & Lt; / TR & gt; }} & Lt; / Table & gt;  

Just run the app. You will not receive any error in compliance or running time. It will run as expected.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -