Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 28-03-2009
Member
 
Join Date: Oct 2008
Posts: 54
ASP.NET Working with Buttons

The following example demonstrate the technique to create two buttons on a page.Buttons are used to trigger actions. Without buttons, we cannot do any sort of work on the form. Button is a Webform control in ASP.Net and the name of the control is Button. HTML elements in ASP .NET files are, by default, treated as text. To make these elements programmable, add a runat="server" attribute to the HTML element. This attribute indicates that the element should be treated as a server control.

Here we are creating a button and its id is defined as b1. text property is used to display the caption of the button on the page. Tooltip property is used to display the tooltip text when you move your mouse over the button.

Code:
<form method = "post" runat = "server">

<asp:Button id = "b1" runat = "server" text = "OK" ToolTip = "Click here to Submit">

</asp:Button>

<asp:Button id = "b2" runat = "server" text = "Cancel" ToolTip = "Click here to Cancel">

</asp:Button>

</form>
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "ASP.NET Working with Buttons"
Thread Thread Starter Forum Replies Last Post
Keyboard buttons working incorrectly! Ohaider Vista Hardware Devices 3 02-05-2012 10:41 PM
Some buttons not working properly in Galaxy tab 7 Dorkfoot Portable Devices 5 26-09-2011 05:39 PM
Voting buttons not working panda dim Technology & Internet 4 27-11-2010 11:30 PM
OSD buttons of Dell U2711 not working Rajnikant-Deva Monitor & Video Cards 4 27-11-2010 10:15 PM
Satellite P300 touch buttons not working Noble Portable Devices 7 02-10-2010 11:54 AM


All times are GMT +5.5. The time now is 04:59 AM.