---
title: "How to make textbox appear only after user clicks button in c#?"  
description: "How to make textbox appear only after user clicks button in c#?"  
author: "Manoj Bhatt"  
published: 2013-11-14  
updated: 2013-11-14  
canonical: https://www.mindstick.com/forum/1742/how-to-make-textbox-appear-only-after-user-clicks-button-in-c-sharp  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# How to make textbox appear only after user clicks button in c#?

How would I make a [textbox](https://www.mindstick.com/forum/12714/dynamic-textbox-in-gridview) appear only after clicking a button. THis means that It should be [hidden](https://www.mindstick.com/forum/2303/skip-validating-field-from-hidden-div), and once [user clicks](https://answers.mindstick.com/qa/34556/if-a-user-clicks-all-the-google-ads-on-my-site-is-it-foul), then it can appear.

```
 private void button7_Click(object sender, EventArgs e) {        // .. what next?       }
```

## Replies

### Reply by Anonymous User

Hi Manoj,

Assuming you have defined a TextBox textBox1 somewhere:

```
private void button7_Click(object sender, EventArgs e){    textBox1.Visible =!textBox1.Visible;      }
```

This way you can toggle the visibility.

You can set it just to true if you like, but make sure the initial Visible state, you can set it in the designer, is false.


---

Original Source: https://www.mindstick.com/forum/1742/how-to-make-textbox-appear-only-after-user-clicks-button-in-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
