When I was writing this ticket https://wisej.com/support/question/datetimepicker-readonly-but-changeable-by-arrow-up-and-down I was thinking why the client is able to update service side controls while they are supposed to be readonly or disabled.
My assumption would be that the user shouldn’t be able to change controls when the state of the control is not changeable and this behaviour is a bug.
Since it’s impossible to stop a tech user to change anything he likes on the browser (and console can’t be blocked – go to facebook, open console and type alert(1) ) what we can do is stop the server side from accepting the change from the client when the control is disabled or read-only.
Only 1 is an issue. The second point is handled correct by WiseJ.
For 1: User is able to change the text of disabled controls –> unwanted behaviour. Not checked by wisej.
For 2: User is not able to click on disabled controls –> expected behaviour and also correctly enforced on serverside by wisej
2. was only an example that you are already checking for enabled on Buttons but not on TextBoxes
We load the POCO = EntityFramework object from the database, bind the properties to the textboxes (or any other editable-control) and afterwards save the entity. I assume this is the typical Workflow for data driven applications.
Thank you for your reply but for us this is not an option. I attached a simple demo how this will be a showstopper for us (and I assume this will be an issue for many other developers).
In my first example you also saw that, for example, changing the text of a label is not send to the server.
no, readonly protects a control from being changed by user activity.
Otherwise there would be no chance to display anything in the browser.
Hope that helps.
Please login first to submit.