---
title: "How can I disable a tab inside a TabControl?"  
description: "How can I disable a tab inside a TabControl?"  
author: "Anonymous User"  
published: 2014-01-29  
updated: 2014-01-29  
canonical: https://www.mindstick.com/forum/1915/how-can-i-disable-a-tab-inside-a-tabcontrol  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# How can I disable a tab inside a TabControl?

Is there any way to [disable](https://www.mindstick.com/forum/12901/how-to-disable-enable-input-box-in-aspx-with-value-from-sql) a tab in a tabcontrol?

## Replies

### Reply by Pravesh Singh

Hi Jeet,\

You could register the "Selecting" event and cancel the navigation to the tab page:

```
private void tabControl1_Selecting(object sender, TabControlCancelEventArgs e){    if (e.TabPage == tabPage2)        e.Cancel = true;}
```

Another idea is to put all the controls on the tabpage in a Panel control and disable the panel.


---

Original Source: https://www.mindstick.com/forum/1915/how-can-i-disable-a-tab-inside-a-tabcontrol

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
