I have a RadTextBox
control in my form, and in one of the methods, it sets the text of the control as such:
SecondHalfTB.EmptyMessage = sharedMailbox.MailboxEmail.Replace("CAAS_", string.Empty)
.Replace("@caas.gov.sg", string.Empty);
<td class="ms-formbody">
CAAS_<telerik:RadTextBox ID="SecondHalfTB" runat="server" MaxLength="255">
</telerik:RadTextBox>
@caas.gov.sg
<div>
<asp:Label ID="lbSecondHalfTB" runat="server" CssClass="WarningMessage"></asp:Label>
</div>
</td>
If I did not enter any values in the textbox, will the following statement return an empty string?
string newEmail = SecondHalfTB.Text;
if (newEmail == string.Empty)
{
newEmail = SecondHalfTB.DisplayText;
}