this may be kind of general but i want to limit the number of character inpit in an editorfor field.
@html.EditorFor(m=>m.id,new {@maxlength="10"})
This does not seem to work.
Try changing it to
@Html.TextBoxFor(m=> m.id, new { maxlength="10" });
EditorFor uses the templates, which you can override yourself. I don't think they take into account the attributes you pass in like this. The TextBoxFox<> generates it in code, and should work fine.