---
title: "Button Control in ASP.Net"  
description: "Button control is used to post the form or fire an event on server side.  When button is clicked then click event is fired.We can provide an event han"  
author: "Pushpendra Singh"  
published: 2010-10-11  
updated: 2020-03-04  
canonical: https://www.mindstick.com/articles/158/button-control-in-asp-dot-net  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 1 minute  

---

# Button Control in ASP.Net

[Button control](https://www.mindstick.com/articles/290/button-control-in-vb-dot-net) is used to [post](https://yourviews.mindstick.com/view/87857/choosing-guest-post-for-backlinks-good-or-bad) the [form](https://yourviews.mindstick.com/view/87344/explained-the-benefits-of-short-form-videos) or [fire](https://www.mindstick.com/forum/155770/amazon-fire-tv-stick-remote-not-working) an [event](https://www.mindstick.com/articles/167719/marquee-hire-benefits-of-event-lighting-hire-london) on [server side](https://www.mindstick.com/forum/143/close-popup-window-by-server-side-code).\

```
<asp:Button ID="Button1" runat="server" Text="Button" />
```

![Button Control in ASP.Net](https://www.mindstick.com/mindstickarticle/63991b40-2b0b-49c0-9498-9f99a02b2be1/images/81cc0c56-269b-49ce-a053-4165fb4f77c2.png)

When button is clicked then click event is fired.

We can provide an event handler for the Click event to programmatically control the actions performed when the button is clicked.

```
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />protected void Button1_Click(object sender, EventArgs e){ Label1.Text = "Hello";}
```

Here, when we click the Button then it will display message “Hello” in Label1

We can change button appearance

```
<asp:Button ID="Button1" runat="server" Font-Bold="True" Font-Names="Arial" Font-Size="Larger" ForeColor="#FF66FF" Text="Button" />
```

Font-Bold property of Button Control is use to make font bold. If we set its Font-Bold property to True it will make text of Button Bold and if we set it False then it will not.

![Button Control in ASP.Net](https://www.mindstick.com/mindstickarticle/63991b40-2b0b-49c0-9498-9f99a02b2be1/images/ca948db2-aca1-45c3-9c41-ab12e2104910.png) ![Button Control in ASP.Net](https://www.mindstick.com/mindstickarticle/63991b40-2b0b-49c0-9498-9f99a02b2be1/images/a836490e-cf94-4e1b-9ffa-2834724a3bfd.png)

---

Original Source: https://www.mindstick.com/articles/158/button-control-in-asp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
