Your Ad Here

Your First Programme

AIM : Changing the text of a Label on click of a button .

Step 1 : Drag and Drop a Label and a Button in your .aspx page. It will some thing like this .( look image).

Step 2 : Double Click the button in the Design view and you will get button event in Default.aspx.cs. Add this Code.
Label1.Text="Hello World";

Step 3 : Right-Click "View in Browser" and You will get Follownig output ( look below ).

            
Before Clicking the Button
             
After Clicking the Button
            

0 comments:

Post a Comment