Click here to Skip to main content
15,917,329 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to an address in a label box when we click a button by default we set label box visible =false
Posted
Comments
Rajesh Kariyavula 29-May-12 1:00am    
As per my understanding you have a Label and a Button, on Clicking the button you want to show something in the label, Is it correct?

1 solution

Try:
ASP.NET
<asp:Button ID="Button1" runat="server" onclick="Button1_Click"/>
<asp:Label id="Label1" runat="server" Visible="false"/>

C#
void Button1_Click(object sender, EventArgs e)
{
    Label1.Visible = true;
    Label1.Text = "Address!!!";
}
 
Share this answer
 
v2
Comments
Rahul Rajat Singh 29-May-12 1:47am    
This seems like the perfect answer for the given question. I think this should me marked as solved now.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900