推送数组中复选框的文本值 [英] Pushing text value of a checkbox in an array

查看:81
本文介绍了推送数组中复选框的文本值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I have two checkboxes like :

<div>
    <asp:CheckBox ID="CheckBox1" runat="server" Checked="true" Text="Status"/>
    </div>
    <div>
    <asp:CheckBox ID="CheckBox2" runat="server" Checked="true" Text="FirstName"/>
    </div>

I have an array like

string[] arrchk = new string[] { };

How can I store the text value of the checkboxes in the array

推荐答案

转换布尔值即ie Y或N的真或假,然后将其存储在数组中。
Convert the boolean value i.e. true or false to 'Y' or 'N' and then store it in the array.


这篇关于推送数组中复选框的文本值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆