I have a razor template like below. I want to check if the value in the input field is null, put a empty string, if the @UIManager.Member.EMail
has a value, put its value. How can I do that?
Normal Input:
<!-- language: lang-html --><input name="EMail" id="SignUpEMail" type="text" class="Input"
value="@UIManager.Member.EMail" validate="RequiredField" />
Razor Syntax Attempt:
<!-- language: lang-html --><input name="EMail" id="SignUpEMail" type="text" class="Input" validate="RequiredField"
value="@(UIManager.Member == null) ? string.Empty : UIManager.Member.EMail" />
The value is shown in the input field is:
True ? string.Empty : UIBusinessManager.MemberCandidate.EMail