Compiler Error Message: CS0103: The name 'EmailTB' does not exist in the current context
I am using a ListView control to display an Email value in the EmailTB text control as shown here
<div class="form_right_view">
<asp:Label ID="EmailTB" runat="server" Text='<%# Eval("Email") %>' CssClass="" Font-Bold="true"></asp:Label>
</div>
I also wanted to use the value of the EmailTB.text in the code behind as follows
if (EmailTB.Text != " ")
{
string Username = Membership.GetUserNameByEmail(EmailTB.Text);
}
But I am getting Compiler Error Message: CS0103: The name 'EmailTB' does not exist in the current context.
Thanks