How to get the value using the form method of the Data container (some do not worry)

Source: Internet
Author: User

During development based on an old system, different values are accessed for a field. Because the content of this field has many attributes and null values, dropdownlistr cannot be used for data binding, of course, this is based on specific conditions. This is a news system, which has several different news formats. Some fields are not required in some display modes, if I only add one page, some textbox and dropdownlistr must be hidden in different modes. (The file range is dropdownlistr.) It is a control to be set to visible = false, in another mode, it is displayed (maybe I am not familiar with the execution sequence). I cannot get the execution sequence of dropdownlistr1 after binding formview with objectdatasource, dropdownlistr can only be bound to dropdownlistr1.visible = false. In a mode that does not need to be displayed, if the range field of the file is null, an error will be reported and the selected value cannot be found, unlike the manual dropdownlistr1.selectedvalue = "file"; to set the selected value, if the value does not exist, select the first one. (I don't know what the two models are different. Microsoft wants to do this, ).


Therefore, I can only use the form method for submission. I started to fill in the filearea in formfield, but it was a bit strange. Like the form in the ASP era, right-click to view the webpage source code, the original file name is changed to formview1 $ filearea, so fill in formview1 $ filearea, OK.

When using form in a data container to obtain a value, you must load it and change the name. This is disturbing me. I am afraid that Microsoft will make some new patches someday, otherwise, different names will be added in non-ie environments. After adding a template or something, the name will change. I may think too much and there is no way to modify it based on the original data. In short, this method is rarely used, otherwise, where can I hear it?ProgramMy heart beat badly.

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.