博客
关于我
asp.net 4.5 练习~test5-2
阅读量:304 次
发布时间:2019-03-03

本文共 1392 字,大约阅读时间需要 4 分钟。

    
WebForm1
密码提示问题:
请任选一项
我的出生地
我的母亲的名字
我的父亲的名字
Label
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;namespace test5_2{    public partial class WebForm1 : System.Web.UI.Page    {        protected void Page_Load(object sender, EventArgs e)        {            Label2.Text = "答案:";        }        protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)        {            switch (DropDownList1.SelectedValue)            {                case "1":                    Label2.Text = DropDownList1.Items[DropDownList1.SelectedIndex].Text + ":";                    break;                case "2":                    Label2.Text = DropDownList1.Items[DropDownList1.SelectedIndex].Text + ":";                    break;                case "3":                    Label2.Text = DropDownList1.Items[DropDownList1.SelectedIndex].Text + ":";                    break;            }        }    }}

转载地址:http://nyrm.baihongyu.com/

你可能感兴趣的文章
OSI七层模型与TCP/IP五层模型(转)
查看>>
OSI七层模型与TCP/IP四层与五层模型详解
查看>>
OSI七层模型的TCP/IP模型都有哪几层和他们的对应关系?
查看>>
OSI操作系统(NETBASE第八课)
查看>>
OSM数据如何下载使用(地图数据篇.11)
查看>>
OSPF 四种设备角色:IR、ABR、BR、ASBR
查看>>
OSPF 四种路由类型:Intra Area、Inter Area、第一、二类外部路由
查看>>
OSPF 学习
查看>>
OSPF 支持的网络类型:广播、NBMA、P2MP和P2P类型
查看>>
OSPF 概念型问题
查看>>
OSPF 的主要目的是什么?
查看>>