Friday, January 23, 2015

Invalid anonymous type member declarator MVC

I got this error message when i use  @data-group in ActionLink.

@Html.ActionLink(cardCategory.Name, "Index", new { controller = "Home" }, new { @class = "btn btn-default btn-lg btn-filter", @data-group = "C" })

Use an underscore _ - the Razor engine is smart enough to translate that to a data- attribute.

No comments:

Post a Comment

How to Create Events Using Microsoft Graph API with Delegated Permissions and MSAL.js

Microsoft Graph API provides powerful capabilities to interact with Microsoft 365 services. In this guide, we’ll explore how to create calen...