make your url with hash tag in mvc actionlink with fragment

hash tag url actionlink with fragment in mvc

Like : http://localhost:61158/home/product/1#product-details
public static MvcHtmlString ActionLink(this HtmlHelper htmlHelper,
 string linkText,
 string actionName,
 string controllerName,
 string protocol,
 string hostName,
 string fragment,
 Object routeValues,
 Object htmlAttributes
)
@Html.ActionLink(
 "Home", // linkText
 "Product", // actionName
 "Product", // controllerName
 null, // protocol
 null, // hostName
 "product-details", // fragment
 new { id = Model.id, area = "" }, // routeValues
 new { @class = "button", target = "_blank" // htmlAttributes
})
make your url with hash tag in mvc actionlink with fragment make your url with hash tag in mvc actionlink with fragment Reviewed by Bhaumik Patel on 8:26 PM Rating: 5