You simply replace your accept (s) with the full mime type in your application / pdf application, and not the * wildcard.
@Html.TextBoxFor(m => m.Attachment, new { @class = "form-control", type = "file", accept="application/pdf" })
You can separate multiple mime types with a comma if you want the PDF and the word in the same download control to be done like this:
@Html.TextBoxFor(m => m.Attachment, new { @class = "form-control", type = "file", accept="application/pdf, application/msword" })
Update
mime ( )
private List<string> mimeTypes = new List<string> {
"application/pdf",
"application/msword"
};
mime , :
model.MimeTypes = string.Join(", ", mimeTypes);
:
@Html.TextBoxFor(m => m.Attachment, new { @class = "form-control", type = "file", accept=Model.MimeTypes })