“Compiler Error Message: CS0103: The name ‘EmailTB’ does not exist “

Asked By 10 points N/A Posted on -
qa-featured

I wanted to display an email value in the EmailTB text control via ListView control, using this syntax below:

<div class="form_right_view">
<asp:Label ID="EmailTB" runat="server" Text='<%# Eval("Email") %>' CssClass="" Font-Bold="true"></asp:Label>
</div>

But when I try to use the value of the EmailTB.text in the code behind using this:

if (EmailTB.Text != " ")
{
string Username = Group.GetUserNameByEmail(EmailTB.Text);
}

I get the error: “Compiler Error Message: CS0103: The name 'EmailTB' does not exist in the current context.”  Please help me fix this.  Thanks!

SHARE
Answered By 0 points N/A #100438

“Compiler Error Message: CS0103: The name ‘EmailTB’ does not exist “

qa-featured

I think the problem that you are having is on this script please have a Try using this kind of script if it will work label=EmailTB or text=EmailTB I think this would solve your problem it just looking at the error and analyze the error and it will give you the solution that you are looking for in troubleshooting scripts like this one sometimes us programmers forget the use of a simple command.

Good luck in your work, i hope this will help you understand that the problem that you have encountered.

And enjoy your stay here you are always welcome here.

Login/Register to Answer

Related Questions