My current code in Index.cshtml
page:
@Html.ActionLinks(@Html.ActionLink(objList.Name, "Name", "ControllerName", new {Id=objList.Id}, new {target = "_blank"}))
The above code makes me to open a page(Name.cshtml
) in a new tab after clicking a link in the Index
page. But my goal is to assign a name(objList.Name
) as a Title
for the new tab.
So, I added the Title attribute in the following code but it is not working as expected.
@Html.ActionLinks(@Html.ActionLink(objList.Name, "Name", "ControllerName", new {Id=objList.Id}, new {target = "_blank", title = objList.Name}))
How to acheive this?