C#: Web Multi-view Control
Introduction
At some point in developing web sites or web applications, there will come a time when a requirement of having tab functionality like there is for a Windows application. Before ASP.NET, JavaScript had to be used to achieve this. But when ASP.NET 2.0 came out, a new set of controls were introduced to give the ability of having tab functionality for the web. With the new controls of a multi-view and view when combined with a few basic buttons, the tab can be created.
Scenario
There is a need for an employee to have easy access to their general information and their paycheck information. Instead of creating two separate pages to show this information, a tab will be needed to flip back and forth from one set of information (General) to the other (Paycheck).
Implementation
On a new aspx page, a DIV section needs to be created to hold the button controls that will be acting as tabs. Inside the DIV, add to buttons. To make sure that the buttons look like tabs and not buttons, set the border style to no border and the border width to 0px. Now to let the user know which tab that is currently being view, there needs to be two different background colors for the buttons. Pick contrasting colors so it's fairly easy to tell the difference. In the article, Gainesboro will be the active tab and Silver will be the inactive tab.
Please Visit Programminghelp.com For the full article and Pictorial tutorial.
http://www.programminghelp.com/web-development/asp-net/c-web-multi-view-control/
previous post
next post