November Happy Hour will be moved to Thursday December 5th.

It it possible to add page title as part of href when rendering @Html.PageLink? <a href title=pageTitle ...

Vote:
 

It it possible to add page title as part of href when rendering @Html.PageLink?

Would like to do this on all pages rendered using @Html.PageLink

#176208
Mar 13, 2017 21:51
Vote:
 

You can add html attributes in the pagelink html helper like this:

@Html.PageLink(page, null, new {title = page.Name})

You can also create an Html helper that looks something like this:

public static MvcHtmlString PageLink(this HtmlHelper helper, PageData page, string title)
{
	return helper.PageLink(page, null, new {title = title});
}

and then use:

@Html.PageLink(page, page.Name)
#176389
Mar 17, 2017 10:30
Vote:
 

thx

#176403
Mar 17, 2017 18:26
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.