I am new to mvc.I created html buttons dynamically and I am unable to assign action for these buttons
Code is:
sb.Append("<li style=\"margin:17px;\">");
sb.Append("<img src=\"" + path + "Content/HeaderSlides/FullImages/"
+ imagename + "\" width=\"180\" height=\"100\"/>");
sb.Append("<input type=\"button\" name=\"deleteimage" + id
+ " \" id=\"btndelete" + id
+ "\" value=\"Delete\" class=\"t-button t-grid-delete\" "
+ " style=\"margin-left:10px;\" />");
I want to make the html buttons something like this:
<input type="submit"
title="Delete"
value="Delete"
name="btndelete"
onclick="location.href='@Url.Action("DeleteHeaderSlide",
"HeaderSlides",
new { filename = "Sunset.jpg" })'" />