Showing posts with label MultiView Control. Show all posts
Showing posts with label MultiView Control. Show all posts

How to create Tabbed Multiview in asp.net with c#

1.File-> New-> Website->  ASP.NET Web Site(Visual C#) -> Ok

(Now You will see a Default.aspx page. To create your own page->click on dropdown list below Edit->click Add new item->Select Web Form->click Add)

2. Click ToolBox(Navigation)-> Double Click on Menu(or drag and drop Menu on Design view)-> Right click on Menu->Select Properties->Change Orientation properties to Horizontal












Click ToolBox-> Double Click on MultiView(or drag and drop MultiView on Design view)->

ToolBox-> Double Click on View(Place view inside Multiview otherwise it will give you error)-> Add three view. Your Window should look like this
3.Click smart tag on menu(Horizontal arrow on image)->Click Edit Menu Items->You will see a pop up window











4.Click on Vertical arrow(on image) to add menu item->change the Text to your desired menu name(here i write home)->change the value to 0 (Add as many menu item as you want-> change the Text to your desired name and increase the value by 1)(this value will be used as ActiveViewIndex value)->OK
























5.Right click on Menu->Select Properties->Click Events->Double click on MenuItemClick event(Vertical arrow)


















And Write this Code:
6. Click F5 to run your project->OK
After Running the project(ActiveViewIndex now 0)














After clicking Menu( ActiveViewIndex now 1)
















After clicking About Us(ActiveViewIndex now 2)

How to use Multiview Control in asp.net or Creating a Registration page using MultiView in vs2010

1.File-> New-> Website->  ASP.NET Web Site(Visual C#) -> Ok

(Now You will see a Default.aspx page. To create your own page->click on dropdown list below Edit->click Add new item->Select Web Form->click Add)

2.Click ToolBox-> Double Click on MultiView(or drag and drop MultiView on Design view)->

3. ToolBox-> Double Click on View(Place view inside Multiview otherwise it will give you error)-> Add three view like this.
asp.net Multiview Control
 In View1 add a label and a textbox(change the label text to User Name )->add a Button(change text property to Next ) 

In View2 add a label, a textbox and two button(change the name as shown on figure)

In View3 also  add a label, a textbox and two button(change the name as shown on figure)

4.Double Click on Next button(view1) to get the code behind-> then write this code
5.Double click on Back button(view2)->write this code
6. Right click on Next button(view2)->select properties->click Events(vertical arrow)->on Click Event select Button1_Click(it is the event you created on view1 next button)
MultiView Event Control

7.Right click on Back button(view3)->select properties->click Events(vertical arrow)->on Click Event select Button2_Click(it is the event you created on view2 Back button)
Multiview Event Control





















8. Click F5 to run your project->Ok
MultiView Control
Before Clicking Next(now in view1)
















MultiView Control
After Clicking view1 Next now in view2


















MultiView Control
After clicking view2 Next now in view3


















MultiView Control
click Back button to go view2

















MultiView Control
After clicking Back button