Problems with request. querystring []

Source: Internet
Author: User
For the relationship between the table structure, the Chinese parameter data needs to be transmitted in the URL. The problem is as follows:

1. http: // localhost/test. aspx? Lanmu = "book", using request. querystring ["lanmu"], obtained "book, not" book ";

2. http: // localhost/test. aspx? Lanmu = book, use request. querystring ["lanmu"], get a null value;

3. http: // localhost/test. aspx? Lanmu = book. Use request. querystring ["lanmu"] to obtain the correct value Book;

The rules I have summarized are as follows:

If the Chinese characters contain even data (including fullwidth symbols );

The value can be obtained normally. If it is an odd number, it can only be an even number (odd-1 and the odd number is not 1;

If it is a Chinese character, the null value is obtained;

Which one can explain why and how to get the correct value.

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.