Jump to content

Calling .net(Mvc) Guys


tucker

Recommended Posts

i had an Add, Update, delete buttons on view page like
<input type="submit" value="Add">


in controller class
public ActionResult Add()
{
.............................
}

when i click the button it is not hitting the method. How to link them to eachother??? Evarikina telisthe tvaraga cheppandi....

Link to comment
Share on other sites

Try this buddy.


@Html.ActionLink("Delete", "Delete", new { id = item.ID })

Using Button
<input type="button" title="Delete" value="D" onclick="location.href='@Url.Action("Delete", "movies", new { id = item.ID })'" />

Using Image
<a href="@Url.Action("Delete", "movies", new { id = item.ID })" title="Edit">
<img src="../../Content/Images/Delete.png" />
</a>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...