---
title: "How to access page controls from master page?"  
description: "How to access page controls from master page?"  
author: "Samuel Fernandes"  
published: 2014-08-28  
updated: 2014-08-28  
canonical: https://www.mindstick.com/forum/2195/how-to-access-page-controls-from-master-page  
category: "asp.net"  
tags: ["asp.net", "access page controls from master page", "c#", ".net", "access controls", "master page control", "web page controls"]  
reading_time: 1 minute  

---

# How to access page controls from master page?

I am aware that many of the [content](https://www.mindstick.com/articles/13019/get-the-best-content-marketing-pricing-packages-for-your-brand) pages will create [textBox](https://www.mindstick.com/forum/12714/dynamic-textbox-in-gridview) [controls](https://www.mindstick.com/articles/66/how-to-create-controls-at-run-time-in-csharp-dot-net) with lets say txtCustomerName. And if this is found I need to [update](https://www.mindstick.com/forum/156353/what-is-hummingbird-update) the value from session. In this particular case I can not move these controls to [master page](https://www.mindstick.com/blog/258/set-property-value-on-master-page-from-content-page).

How do you [access](https://www.mindstick.com/articles/12994/how-foreigners-can-access-blocked-websites-in-china) page controls from master page. And in which [event](https://www.mindstick.com/articles/167719/marquee-hire-benefits-of-event-lighting-hire-london) of [page life cycle](https://www.mindstick.com/interview/136/page-life-cycle-in-asp-dot-net) should we attempt to do this ?

## Replies

### Reply by Sumit Kesarwani

Hi Samuel,

You can find in any Event you would like to, like in this example I am showing you on Button Click Event

```
protected void Button1_Click(object sender, EventArgs e){   TextBox TextBox1 =ContentPlaceHolder1.FindControl("TextBox1") as TextBox;   if (TextBox1 !=null)   {       Label1.Text =TextBox1.Text;   }}
```


---

Original Source: https://www.mindstick.com/forum/2195/how-to-access-page-controls-from-master-page

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
