博客
关于我
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数据库SQL注入靶场sqli通关实战(附靶场安装包)
查看>>
MYSQL数据库下载安装(Windows版本)
查看>>
MySQL数据库与Informix:能否创建同名表?
查看>>
mysql数据库中的数据如何加密呢?mysql8.0自带新特性
查看>>
MySQL数据库优化
查看>>
MySQL数据库优化总结
查看>>
MySQL数据库入门看这一篇文章就够了
查看>>
Mysql数据库函数contac_函数:函数删除操作语法&使用例——《mysql 从入门到内卷再到入土》...
查看>>
mysql数据库命令备份还原
查看>>
mysql数据库基础教程
查看>>
MySQL数据库备份
查看>>
mysql数据库备份与恢复
查看>>
MySQL数据库备份实战
查看>>
Mysql数据库备份的问题:mysqldump: Got error: 1049: Unknown_无需整理
查看>>
mysql数据库如何重置密码是多少钱_MySQL数据库忘记root密码如何重置修改
查看>>
MySQL数据库安装配置与常用命令
查看>>
MySQL数据库实现主从同步数据
查看>>
mysql数据库导入导出_windows系统以及linux系统下的操作---linux工作笔记042
查看>>
mysql数据库导出导入
查看>>
MySQL数据库工具类之——DataTable批量加入MySQL数据库(Net版)
查看>>