The second object parameter for Html.EditorFor isn't for HTML attributes, it's for additional view data. The EditorFor helpers don't allow customizing HTML attributes in the way that e.g. the more specific <input> helpers do - they take most of their setup from model metadata (for example [Attributes]).
Easiest way to "fix" is obviously dropping EditorFor:
@Html.TextBoxFor(model => model.SireTag, new { data_typeahead = "dsfsdfsd" })
Alternatively, write your own EditorTemplate for the property. This could allow you to use (or simplify) your original syntax, by retrieving the data_typeahead value from ViewData["data_typeahead"] (or "typeahead").
One step further, more advanced, you could make your own Attribute to apply to your model properties + your own ModelMetadataProvider (or - simpler - use IMetadataAware, more on that below) to turn it into metadata that the EditorTemplate could use - this in order to remove the decision about data- attributes entirely from your View, turning your call into:
@Html.EditorFor(model => model.SireTag)
... and your model into something like:
public class MyModel
{
[Typeahead("dsfsdfsd")]
public string SireTag { get; set; }
}
Example of this approach using IMetadataAware:
[AttributeUsage(AttributeTargets.Property)]
public class TypeaheadAttribute : Attribute, IMetadataAware
{
private readonly string value;
public TypeaheadAttribute(string value)
{
this.value = value;
}
public void OnMetadataCreated(ModelMetadata metadata)
{
metadata.AdditionalValues["typeahead"] = value;
}
}
This metadata entry can then be extracted in the EditorTemplate, using ViewContext.ViewData.ModelMetadata.AdditionalValues (a dictionary) and the result be added to an attributes dictionary passed to e.g. Html.TextBox.