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

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

webform1.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="test5_2.WebForm1" %>
请任选一项
我的出生地
我母亲的名字
我父亲的名字

webform1.aspx.cs

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/

你可能感兴趣的文章
MySQL常见架构的应用
查看>>
MySQL常见的三种存储引擎(InnoDB、MyISAM、MEMORY)
查看>>
MySQL常见的三种存储引擎(InnoDB、MyISAM、MEMORY)
查看>>
MySQL常见约束条件
查看>>
MySQL常见错误
查看>>
MySQL常见错误分析与解决方法总结
查看>>
mysql并发死锁案例
查看>>
MySQL幻读:大家好,我是幻读,我今天又被解决了
查看>>
MySQL底层概述—1.InnoDB内存结构
查看>>
MySQL底层概述—2.InnoDB磁盘结构
查看>>
MySQL底层概述—3.InnoDB线程模型
查看>>
MySQL底层概述—4.InnoDB数据文件
查看>>
MySQL底层概述—5.InnoDB参数优化
查看>>
MySQL底层概述—6.索引原理
查看>>
MySQL底层概述—7.优化原则及慢查询
查看>>
MySQL底层概述—8.JOIN排序索引优化
查看>>
MySQL底层概述—9.ACID与事务
查看>>
Mysql建立中英文全文索引(mysql5.7以上)
查看>>
mysql建立索引的几大原则
查看>>
Mysql建表中的 “FEDERATED 引擎连接失败 - Server Name Doesn‘t Exist“ 解决方法
查看>>