---
title: "View Control in ASP.Net"  
description: "The MultiView control is a container control that can have only View Controls. The View Controls, which are also container controls, can only be house"  
author: "Pushpendra Singh"  
published: 2010-10-28  
updated: 2019-09-07  
canonical: https://www.mindstick.com/articles/182/view-control-in-asp-dot-net  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 2 minutes  

---

# View Control in ASP.Net

The *MultiView* [control](https://yourviews.mindstick.com/view/83439/bipartisan-gun-control-bill-passed-in-us-after-decades) is a [container](https://www.mindstick.com/forum/34127/extjs-how-to-set-border-for-the-container) control that can have only [View](https://yourviews.mindstick.com/view/84701/layoffs-in-google-india-2023-view) [Controls](https://www.mindstick.com/articles/66/how-to-create-controls-at-run-time-in-csharp-dot-net). The *View* Controls, which are also container controls, can only be housed in *MultiView* controls.\

```
<asp:MultiView ID="MultiView1" runat="server"><asp:View ID="view1" runat="server"></asp:View></asp:MultiView>
```

\

![View Control in ASP.Net](https://www.mindstick.com/mindstickarticle/35fb463b-8bca-4a53-a194-fc86f09899ee/images/5a7d0d66-4428-4088-88a9-8bc4784c598e.png)

![View Control in ASP.Net](https://www.mindstick.com/mindstickarticle/35fb463b-8bca-4a53-a194-fc86f09899ee/images/68c1f02d-cc3a-4f06-8393-f5084338de4f.png)

Here three [LinkButton](https://www.mindstick.com/forum/2100/linkbutton-to-expand-gridview-causes-row-colors-from-function-to-be-lost) is used to show all these three view .When you [click](https://www.mindstick.com/articles/12423/social-login-magento-2-one-click-to-register-social) LinkButton one then view1 will show and so on.

```
<asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click">Personal Information</asp:LinkButton>            <asp:LinkButton ID="LinkButton2" runat="server" OnClick="LinkButton2_Click">Contact info</asp:LinkButton>            <asp:LinkButton ID="LinkButton3" runat="server" OnClick="LinkButton3_Click">Image</asp:LinkButton><asp:MultiView ID="MultiView1" runat="server">            <asp:View ID="view1" runat="server">                                Name                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>                                Id                <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>                                Country                <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>            </asp:View>            <asp:View ID="view2" runat="server">                                Mob.No.             <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>                                Email Id                <asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>            </asp:View>            <asp:View ID="view3" runat="server">                            <asp:Image ID="Image1" runat="server" ImageUrl="~/grass2.jpg"  Width="121px" />                         <asp:Image ID="Image2" runat="server" Height="88px" ImageUrl="~/2609grass.jpg" Width="134px" />            </asp:View>   </asp:MultiView>    protected void LinkButton1_Click(object sender, EventArgs e)    {        MultiView1.ActiveViewIndex = 0;    }    protected void LinkButton2_Click(object sender, EventArgs e)    {        MultiView1.ActiveViewIndex = 1;    }      protected void LinkButton3_Click(object sender, EventArgs e)    {        MultiView1.ActiveViewIndex = 2;    }
```

The View control has a Tab [Index](https://yourviews.mindstick.com/view/81152/rsf-press-freedom-index-does-not-have-any-idea-about-india) which sets the TabInxex of a View. The TabIndex is mapped with the ActiveViewIndex of MultiView control. When you set MultiView1.ActiveViewIndex = 0; then first view will be active.

When you click LinkButton1 then [Personal Information](https://answers.mindstick.com/qa/102585/how-to-secure-personal-information-on-a-laptop) View will show in the [page](https://yourviews.mindstick.com/view/83591/the-complete-guide-page-speed-optimisation-and-seo)

![View Control in ASP.Net](https://www.mindstick.com/mindstickarticle/35fb463b-8bca-4a53-a194-fc86f09899ee/images/3ebd9024-cdc2-4d18-9a27-04f50f6a3de3.png)

When you click LinkButton2 then contact Information View will show in the page

![View Control in ASP.Net](https://www.mindstick.com/mindstickarticle/35fb463b-8bca-4a53-a194-fc86f09899ee/images/f06948e1-5dfb-431d-9b1b-e39d35f75879.png)

When you click LinkButton3 then [Image](https://www.mindstick.com/articles/23551/an-investigate-distinctive-seafood-restaurant-for-your-image-stamp-character) View will show in the page.

![View Control in ASP.Net](https://www.mindstick.com/mindstickarticle/35fb463b-8bca-4a53-a194-fc86f09899ee/images/703d7655-a3e6-4266-a8e1-6ff422c5b65f.png)

---

Original Source: https://www.mindstick.com/articles/182/view-control-in-asp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
