-- Method for obtaining control group values-

Source: Internet
Author: User
First, the values of a group of controls retrieved by request. Form are separated by commas (,).

If five texts with the same name = name1 are obtained through request. Form ["name"], the values are 1, 2, 4, 5.

We use the split function to convert it to an array: request. Form ["name"]. Split (',');

Then we can handle it at will.

The following is a simple example:

String [] arrid = request. Form ["ID"]. Split (',');//
String [] arrfldname = request. Form ["fldname"]. Split (',');
String [] arrcaption = request. Form ["caption"]. Split (',');
String [] arrfldtype = request. Form ["fldtype"]. Split (',');
String [] arrmaxlength = request. Form ["maxlength"]. Split (',');
String [] arrrelatetbl = request. Form ["relatetbl"]. Split (',');
String [] arrrelateiterator = request. Form ["relateiterator"]. Split (',');
String [] arrbnull = request. Form ["bnull"]. Split (',');
For (INT I = 0; I <arrid. length; I ++)
{
String id = arrid [I]. tostring ();
String fldname = arrfldname [I]. tostring ();
String caption = arrcaption [I]. tostring ();
String fldtype = arrfldtype [I]. tostring ();
String maxlength = arrmaxlength [I]. tostring ();
String relatetbl = arrrelatetbl [I]. tostring ();
String relateiterator = arrrelateiterator [I]. tostring ();
String bnull = arrbnull [I]. tostring ();
}

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.