How to use MultiView Control in ASP.Net

In previous asp.net server control post we had discussed about DropDownList Control and ListBox Control and CheckBox Control and RadioButton Control and Adrotator Control and FileUpload Control and TextBox Control.

ASP.Net MultiView Control

MultiView Control is an asp.net web server control. Multiview Control is a same as Tab control. If you want make a complex designing on one web forms then you have to use multiview control.

MltiView control is a container of several view control. In a multiview control there are many view control for designing separation of view for user.

The View control is a container of several web server controls. Using the multiview control we can feel the multiple page view design on a single web page.

We can also say multiview control allow user to create different view on single web page.There are many view control in a multiview control, each view control has a some web server control for design web page. we can see single view at a time on web page by specify the ActiveViewIndex property of multiview control.

All view control assign automatically index to all it, the index always start from zero. The first view1 index is zero, second is one and so on….
If we want to display first view on web page, then we need to write MultiView1.ActiveViewIndex=0.

Here we take an example to understand how to use  multiview control in asp.net c#.

First create a asp.net web application and design web forms like below.
Design the web form with a multiview control and three view control within it along with three button control.

The HTML Design code for multiview is :

 

Example of MultiView Control in ASP.Net

After Design asp.net web forms take a multiview control on web forms from toolbox.

How to use MultiView control in ASP.Net C#.

How to use MultiView control in ASP.Net C#.

Now, add some view control in multiview control as per your needs, here we use three view control to understand this multiview control example. The three view View1, View2 and View3, after taking views on web page design the all view control with some web server control.

How to use MultiView control in ASP.Net C#.

How to use MultiView control in ASP.Net C#.

Below screen shows the final designing of web page. here we take three view control in multiview control and design all three view control as per our requirement. There are three button on web page for display view control on page.

How to use MultiView control in ASP.Net C#.

How to use MultiView control in ASP.Net C#.

Here, is the out put of multiview example, when we run the application, by default we can not see any view on web page.  we just see the three button control on web page for display the view control.

How to use MultiView control in ASP.Net C#.

How to use MultiView control in ASP.Net C#.

When we click to button View1 then the view1 is displaying on web page.

Here we need to write below code for display view1 in button control.

How to use MultiView control in ASP.Net C#.

How to use MultiView control in ASP.Net C#.

When we click button View2 then the view2 is displaying on web page.

Here we need to write below code for display view2 in button control.

How to use MultiView control in ASP.Net C#.

How to use MultiView control in ASP.Net C#.

When we click to button View3 then the view3 is displaying on web page.

Here we need to write below code for display view3 in button control.

How to use MultiView control in ASP.Net C#.

How to use MultiView control in ASP.Net C#.

 

Here, is the code behind C# code for MultiView Control all three buttons controls.

 VB.Net Code for MultiView Control Example:

 

Leave a Reply

Your email address will not be published. Required fields are marked *

4 + 2 =


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">