Small example
The. aspx code is as follows:
<%@ page language= "C #" autoeventwireup= "true" codefile= "2_multiview.aspx.cs" inherits= "_2_multiview"%><! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
The. Aspx.cs code is as follows:Using system;using system.collections.generic;using system.linq;using system.web;using System.Web.UI;using System.web.ui.webcontrols;public partial class _2_multiview:system.web.ui.page{protected void Page_Load (object Sende R, EventArgs e) {} protected void Radiobuttonlist1_selectedindexchanged (object sender, EventArgs e) { string s_havephone = Rbl_1.selectedvalue; Switch (s_havephone) {case "0"://No mobile MV1. SetActiveView (V_NO); Break Case "1"://Have mobile MV1. SetActiveView (V_Q2); Break }} protected void Radiobuttonlist1_selectedindexchanged1 (object sender, EventArgs e) {mv1. SetActiveView (V_done); } protected void button1_click (object sender, EventArgs e) {mv1. SetActiveView (V_Q2); } protected void Button2_Click (object sender, EventArgs e) {Response.Redirect ("2_multiview.aspx"); Please verify for yourself why you do not use SetActiveView Mv1. SetActiveView (V_Q1); } protected void Button3_Click (object sender, EventArgs e) {mv1. SetActiveView (V_done); }}
MultiView and view in ASP.