kamal hamzat

kamal hamzat

  • NA
  • 1
  • 3.4k

Compiler Error Message: CS0103: The name 'EmailTB' does not exist in the current context

Nov 11 2011 6:47 AM
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

Answers (2)