I have the next code and i don’t get why it’s not working.
<asp:Label ID="lblFull" Visible="false" runat="server">
<asp:TextBox ID="EmailtxtboxFull" Width="250px" runat="server" Font-Size="Medium" ForeColor="Blue" BorderWidth="1"></asp:TextBox>
</asp:Label>
<asp:Label ID="lblEnd" Visible="false" runat="server"></asp:Label>
<asp:Button ID="btnFull" OnClick="btnFull_Click" runat="server" Text="Send" Font-Size="Medium" ForeColor="#0066FF" BorderStyle="Solid" BorderWidth="1" />
c # code :
protected void btnFull_Click(object sender, EventArgs e)
{
String Email = EmailtxtboxFull.Text.ToString();
lblFull.Visible = false;
lblEnd.Visible = true;
lblEnd.Text = Email;
}
When i click on the btn … i got empty lable and not the email that i wrote on the textbox. why this it’s happent? that’s connect to the autopostback ? how to fix that?
You have your EmailtxtboxFull textbox inside your label, are you sure the code sample is right?
when i corrected the label the code behaved correctly for me.