Problems to be Solved:
Upload the following URL as a parameter to other pages
1 http: // domain/de. retrial? Uid = 12 & page = 15
2. The parameters following the url contain Chinese characters, such as:... aspx? Title = crane
In the above case, an RUL encoding and decoding process must be performed; otherwise, an error may occur.
The Code is as follows:
<A href = "DictEdit. aspx? Dict = <% # Eval ("SourceLang") %> & target = <% # Eval ("TargetLang") %> & Email = <% # Eval ("UserEmail ") %> & Word = <% # System. web. httpUtility. urlEncode (Eval ("Word "). toString () %> "> </a>
1 // pass the value
2 string temp = "<a href = 'add. aspx? Url = "+ Server. urlEncode (skin. page. request. url. absoluteUri) + "& title =" + Server. urlEncode (skin. page. header. title) + "'> Add to favorites </a> ");
3
4 // obtain the value from the above in another file
5if (Request. QueryString ["url"]! = Null)
6 {
7 string url = Server. UrlDecode (Request. QueryString ["url"]. ToString ());
8 this.txt Address. Text = url;
9}
10if (Request. QueryString ["title"]! = Null)
11 {
12 string title = Server. UrlDecode (Request. QueryString ["title"]. ToString ());
13 this.txt Title. Text = title;
14}