c How to assign an array to a checkbox

Updated on technology 2024-08-14
12 answers
  1. Anonymous users2024-02-16

    Write a method getradio() in the background, where list is an array.

    public string getradio()string str = null;

    for(int i=0; i";

    return str;

    You can call this method directly where the page needs it.

  2. Anonymous users2024-02-15

    My understanding of the title: think of the checkbox as a container, load the array, and use it for other things.

    Idea: Put the array together, similar to a b c d to the checkbox, and use the regular to unwrap it when calling.

    Can't read the title.

  3. Anonymous users2024-02-14

    Whether it's a circular array, assign checkbx, display value, if so, see below.

    int arrys = new int

    for (int i = 0;i < i++) I'm using the checkboxlist control.

  4. Anonymous users2024-02-13

    C in how to assign an array to checkbox is a radio box, the array is indeed a plurality of data, can not be assigned, if it is a checkboxlist, use the database attribute,

  5. Anonymous users2024-02-12

    Is the name attribute or the text attribute of checkbox a bun?

    It is recommended to use the text attribute to increase the "price" and directly assign the text attribute

    For example:"Dumplings 10 yuan";

  6. Anonymous users2024-02-11

    Good evening. This way, each checkbox is assigned a value every time the page is opened.

  7. Anonymous users2024-02-10

    You can loop through all the checkboxes, take out the value and put it in the string and pass it. Hope it helps.

  8. Anonymous users2024-02-09

    You can put 3 sets of checkboxes into containers such as groupbox, panel, etc., and put the index value of checkbox into tabindex or tag, then the program is very simple.

    Traverse checkbox method 1

    foreach (control c in Iterate through all controls in groupbox1.

    Traverse checkbox method 2

    for (int i = 8; i >= 1; i--)

  9. Anonymous users2024-02-08

    CheckboxList is a collection of checkboxes, it doesn't make sense to assign a value to CheckboxList, you have to assign a value to the options inside.

    listitem("Text 1", "value1"));

    listitem("Text 2", "value2"));

  10. Anonymous users2024-02-07

    Sence:

    Suppose that the checkboxlist has bound three pieces of data, and the values of the three data are 1, 2, and 3 respectively

    Data are now available1,3. Items with values of 1,3 need to be displayed as selected.

    string vals=new string ;

    foreach(string val in vals)} I don't know if that's what you mean. Hehe.

  11. Anonymous users2024-02-06

    You first query a data source dt (datatable type) from the database and then = dt;Data sources.

    name";The name that appears.

    value";The value returned.

    Or if you just want to bind some fixed values, you can manually create a dt or a listitem("name", "value"));Add one by one.

  12. Anonymous users2024-02-05

    1) Create a new Windows Application in Visual Studio. Arrange two controls on form1: textbox1 and button1, as shown in the following figure.

    2) Backstage**.

    using system;

    using ;

    using ;

    using ;

    using ;

    using ;

    using ;

    using ;

    private void button1_click(object sender, eventargs e)

    void chkbox_click(object sender, eventargs e)else

Related questions
11 answers2024-08-14

The ** on the first floor contains several key steps. I guess that's enough, hehe.

12 answers2024-08-14

You didn't show the array when you wrote it like that!

You should: byte a = new byte[10] ; >>>More

17 answers2024-08-14

#include

#include >>>More

15 answers2024-08-14

Simply write a to see if it is satisfied, int qwe = new int[6] ; >>>More