MultiView and view in ASP.

Source: Internet
Author: User


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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.