After readonly = true or Disabled = true of text field, it cannot be obtained in the background.

Source: Internet
Author: User
Tags allkeys

In the past, in the ASP. NET background, request. Form ("txtdate") was used to obtain the value of txtdate,

The request. Form ("txtdate") of today always gets nothing.

Set breakpoint debugging, found? Request. Form. allkeys does not contain txtdate.

We can see that <input type = text name = txtdate readonly> contains multiple readonly,

After readonly is removed, txtdate is available in the request. Form. allkeys set, and the foreground txtdate value can be obtained smoothly.

I think it may be like this:

When readonly = true or Disabled = true for text field, the background cannot obtain its value through request. form.

Now I only need to add another hide type input to synchronize the txtdate value,

Then obtain the value of hidedate in the background (this txtdate can be input based on changes in other situations, and sometimes the input needs to be limited)

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.