[ASP. NET Web API tutorial] 5.2 send HTML form data: URL-encoded form data, api5.2
Note: This article is part of the [ASP. NET Web API series tutorial]. If this is the first time you read this series of tutorials, read the previous content first.5.2
API Documentation Section@Target ({elementtype.parameter, Elementtype.method, Elementtype.field}) @Retention (retentionpolicy.runtime) public @interface Formparam { /** * Defines the name of the form parameter whose value would be used *
Special character escaping encoding in URL URLsDecember 29, 2017 09:10:57Hits:Special character escaping encoding in URL URLsCharacter-URL encoded valueSpaces-%20"-%22#-%23%-%25&-%26(-%28)-%29+-%2B,-%2c/-%2F:-%3a; -%3b=-%3d>-%3e? -%3f@-%40\-%5C|
This is a creation in
Article, where the information may have evolved or changed.
Package URL
Import "Net/url"
The URL package resolves the URL and implements the query's escape code, see RFC 3986.
Index
Func Queryescape (s string) string
Usually if something needs to be coded, it means that something is not suitable for transmission. There are a variety of reasons, such as size too large to contain private data, and for URLs, the reason for encoding is because some characters in the
Overview IIS URL Rewrite 2.1 Enables Web administrators to create powerful rules that make it easier for users to remember URLs and make search engines easier to find. Rewrite the mappings by using the rule template. NET provider and other features
Document directory
1. Understand how query string (URL) filter works
2. Build the content & page
3. Add query string (URL) filter Web parts for each attribute you want to control on the URL
4. connect each filter Web part to the Web parts you
Complete URL Chinese Encoding
I thought this would work.
Public static string strtourl (string Str ){String result = NULL;Try {Result = urlencoder. encode (STR, "UTF-8"); // gb2312} Catch (unsupportedencodingexception e ){// Todo auto-generated
Objective:When jquery Ajax is under UTF-8 encoding (page utf-8, receive utf-8), there is no problem. You can post, get, and process the page directly to obtain the correct content.
But in the following cases:
GBK-> AJAX POST->GBK
UTF-8-> AJAX
Let's take a look at three urls:
Url1. http://hi.baidu.com/aobao's Yan
Url2. http://hi.baidu.com/%E7%88%B1%E5% AE %9D%E7%9A%84%E5%A6%8D (UTF-8 coding)
Url3. http://hi.baidu.com/%B0% AE %B1%A6%B5%C4%E5%FB (GBK encoding)
These three URLs point
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.