Tutorial search
Tutorials
Stuff
Affiliates
Photoshop Templates
ASP.NET Button Example - ASP.NET tutorial


Button Example
Step-1
First of all, Open Microsoft Visual Studio and create a new website File->New->Web Site Then apply a text Mouse-Over Effects on a Button and Move your mouse over the buttons to observe the mouse-over effects. Insert button1, button2 and label1 and apply effects to them as well.
Step-2
In this area we are showing the code for button1_click event.
Step-3
In this area showing the property button1 and button2 on mouseover and mouseout. Button1 Property is showing onmouseover=”this.style.backgroundcolor=’yellow’” and mouseout=”this.style.backgroundcolor=’buttonface’” .
In this area showing the property button1 and button2 on mouseover and mouseout. Button1 Property is showing onmouseover=”this.style.fontweight=’bold’” and mouseout=”this.style.fontweight=’normal’” .
Step-4
Step-5
This is our result so far
Step-6
If you roll over the button1 it turns yellow because button1 backcolor is yellow. If you click on the button1 then label.text is showing the “you clicked button1”.
Step-7
If you roll over the button2 it turns white because button2 fontweight is bold. If you click the button2 then label.text is showing the “you clicked button2”.


