lundi 13 juillet 2015

Using a checkbox to disable an auto-generated e-mail

On a page titled View.cshtml I have a checkbox within a table in HTML:

<td colspan="3">
<input id="no_emails" name="emails" type="checkbox" value="true"/>Do not send e-mail to requestor.</td>

I tried referencing it later on another page titled Controller.cs:

(View.cshtml.getElementById('no_emails').value) != "true")

This code is part of an If statement that will generate the e-mails if the box is clicked. I can't seem to get this function to work properly. Am I doing a poor job referencing the checkbox from another page?




Aucun commentaire:

Enregistrer un commentaire