A TabControl is used when there are multiple controls to be displayed in a single form, TabControls helps in aligning the controls into groups and provides a better UI design to the form, in this post we shall see on how to add TabControls to a C# Windows Form.
Tuesday, November 20, 2012
Adding TabControl to a C# Windows Form
A TabControl is used when there are multiple controls to be displayed in a single form, TabControls helps in aligning the controls into groups and provides a better UI design to the form, in this post we shall see on how to add TabControls to a C# Windows Form.
Wednesday, March 28, 2012
Asp.Net Tab Structure using Asp:Menu Control
Asp.Net 2.0 does not have a built in Tab Structure; we can implement this with some 3rd party controls, but to do so we need to undergo the additional hassle of integrating with the 3rd party assemblies and at time we end up in scenarios where the hosting/production environment does not allow hosting of 3rd party assemblies, or there could be privilege issues in deploying 3rd party assemblies to the hosting/production environment. So what do we do? We still need to have the Tab Structure right!! Here is the work around, we can use the
Let us now see, how to get a Tab Structure in Asp.Net 2.0 using the built in Asp:Menu
Create a new Asp.Net Project and create a page where we need to implement the Tab Structure.
Add an Asp:Menu
The style attributes StaticMenuStyle & StaticSelectedStyle refer to the style sheets defined in the .css file below
.MenuNormal
{
background-color:Silver;
color:Blue;
font-family:Verdana;
font-size:15px;
border-style:solid;
border-color:Black;
border-width:1px;
}
.MenuActive
{
background-color:Maroon;
color:White;
font-family:Verdana;
font-size:15px;
border-style:solid;
border-color:Black;
border-width:1px;
}
The Selected Tab can be identified by implementing the MenuItemClick event as follows
protected void mnuMain_MenuItemClick(object sender, MenuEventArgs e)
{
lblMsg.Text = "You have selected the Tab: " + e.Item.Value;
}

