0

I have a Notes property (or field) that needs an attribute to indicate it requires long text (memo field) which will end up being a textarea instead of an input in html.

What's the most conventional attribute I can use to indicate this to myself?

I tried

[Editor(GetType(MemoEditor))]
public string Notes

but there is no MemoEditor nor anything like it that I could find.

Note that this is just metadata I don't expect any framework to decide what html to make. I'm doing that on my own. I just want to comply with convention.

I don't want to make my own attribute. It's not that important.

1 Answer 1

1

[DataType(DataType.MultilineText)] will give you a textarea.

[DataType(DataType.MultilineText)]
public string Notes

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.