ASP.NET+JS implementation of batch coding and decoding method _ practical skills

Source: Internet
Author: User

This article describes the method of Asp.net+js to realize batch coding and decoding. Share to everyone for your reference, specific as follows:

<%@ Page language= "C #" autoeventwireup= "true" codefile= "Default.aspx.cs" inherits= "_default"%> <! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">  

The

C # code is as follows:

 using System; using System.Collections.Generic; using System.Linq; using System.Web; u
Sing System.Web.UI;
Using System.Web.UI.WebControls; Public partial class _default:system.web.ui.page {protected void Page_Load (object sender, EventArgs e) {if (Re
      quest["Id"]!=null {string msg = "";
      msg + + "<font color= ' red ' > Server gets the value (before decoding):<br/>"; foreach (string s in Request.Form.AllKeys) {msg + string.
      Format ("{0}:{1}<br/>", S, Request.form[s]);
      MSG + + "server-obtained value (decoded):<br/>"; foreach (string s in Request.Form.AllKeys) {msg + string.
      Format ("{0}:{1}<br/>", S, Httputility.urldecode (Request.form[s));
      msg + = "</font>"; MSG + String.
      Format ("encoded character decoding 1ab&<b> small </b>:{0}", Httputility.urldecode ("1ab&<b> small </b>"));
      Response.Write (msg);
    Response.End (); }
  }
}

I hope this article will help you with ASP.net programming.

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.