0

We have some requirements to send emails when various field values are changed in our system.

It's an asp.net system using linq to sql with javascript/jquery.

Is it preferred to check if a value is changed via js (hidden field is set if the value is changed) or is it better since we are using linq and I have access to the object in question to check that object's current value with what the user has entered (basically compare the textbox value with the object's field value before it is being updated)?

1

My opinion is that it's better to make system behavior decisions server-side (in your case linq).

I like to assume that all of my client code could be hacked by an evil person who is up to no good. If that code is nothing but presentation, then I'm a little safer.

What would happen if evil client code reported that many fields had changed when they hadn't?

  • This is pretty reasonable, although this is an intranet tool so we aren't as worried, although I do understand the concerns. – JonH Apr 3 '14 at 15:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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