San
San

Reputation: 1104

Is it possible to use ActionLink and data-role same time?

I wanted to change ActionLink like:

@Html.ActionLink("Create New", "Create", null, new { @data-role = "button" })

But it doesn't work. Is it possible to assign data-role into ActionLink?

Upvotes: 0

Views: 714

Answers (1)

Kassem
Kassem

Reputation: 8276

I assume you're trying to use data-dash attributes, right? In this case, you should use:

@data_role = "button"

instead of:

@data-role = "button"

Upvotes: 2

Related Questions