asp.net 4.5 练习~test4-8
发布日期:2021-05-06 21:15:31 浏览次数:22 分类:技术文章

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

webform1.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="test4_8.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 test4_8{    public partial class WebForm1 : System.Web.UI.Page    {        protected void Page_Load(object sender, EventArgs e)        {        }        protected void CheckBoxList1_SelectedIndexChanged(object sender, EventArgs e)        {            string result = string.Empty;            for (int i = 0; i < CheckBoxList1.Items.Count; i++)            {                if (CheckBoxList1.Items[i].Selected == true)                {                    result += CheckBoxList1.Items[i].Text + " ";                }            }            lbl_tips.Text = Label1.Text + result;        }    }}

 

上一篇:asp.net 4.5 练习~test4-9
下一篇:asp.net 4.5 练习 ~test4-7

发表评论

最新留言

很好
[***.229.124.182]2025年03月12日 10时42分08秒