uneditable text input field

Does anyone know if it is possible to create an uneditable text input field using the form tag helpers?

Does anyone know if it is possible to create an uneditable text input field using the form tag helpers?

You should be able to set the disabled or readonly attribute (these aren't the same - make sure you use the one most appropriate for your usage)

Fred

nice, thanks!

Frederick Cheung wrote:

Does anyone know if it is possible to create an uneditable text input field using the form tag helpers?

You should be able to set the disabled or readonly attribute (these aren't the same - make sure you use the one most appropriate for your usage)

But this is usually poor UI design. In general, it's better to either leave the control enabled or use static text.

And of course, don't rely on a disabled control to prevent users from changing things. A malicious user could send a specially crafted request to your application that would edit a "disabled" parameter...

Fred

Best,