Use an underscore instead of a dash.
new { data_myid = m.ID }
This definitely works in MVC3 (haven’t checked other versions). The underscore will be converted to a dash when the HTML is rendered.
EDIT
This works in the latest versions of MVC too.
Use an underscore instead of a dash.
new { data_myid = m.ID }
This definitely works in MVC3 (haven’t checked other versions). The underscore will be converted to a dash when the HTML is rendered.
EDIT
This works in the latest versions of MVC too.