I am replacing this ‘hand-rolled’ tabstrip with the Telerik Extensions Tabstrip below it, but I can’t fathom how to get the Tabstrip to include the target attribute in the URL for each item. How can I achieve this?
Before:
<ol>
@foreach (var sheet in Model.Sheets)
{
<li>
<a href="@(Url.Content(Server.MapUrl(sheet.FilePath)) + "?guid=" + Guid.NewGuid())" target="selected-worksheet">@sheet.Name</a></li>
}
</ol>
After:
@Html.Telerik().TabStrip().Name("Card").BindTo(Model.Sheets, (item, tabInfo) =>
{
item.Text = tabInfo.Name;
item.Url = Url.Content(Server.MapUrl(tabInfo.FilePath));
})
You could use the
LinkHtmlAttributesproperty to set additional html attributes:Actually I’ve never used Telerik, so I am not quite sure if you have to instantiate a new dictionary or simply add a key (in case the property is automatically instantiated):