zoukankan      html  css  js  c++  java
  • ASP POST请求

    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <title></title>
    <meta charset="utf-8" />
    </head>
    <body>
        <form method="post" action="Accept.ashx">
            用户名:<input type="text" name="txtName" value="" /><br />
            密 码: <input type="password" name="txtPwd" value="" /><br />
            <button type="submit">提交</button>
        </form>
    </body>

    </html>


    <%@ WebHandler Language="C#" Class="Accept" %>


    using System;
    using System.Web;


    public class Accept : IHttpHandler {


        public void ProcessRequest (HttpContext context) {
            context.Response.ContentType = "text/plain";
            string userName = context.Request.Form["txtName"];
            string userPwd = context.Request.Form["txtPwd"];

            context.Response.Write("您输入的用户名为" + userName + " 密码为" + userPwd);
        }


        public bool IsReusable {
            get {
                return false;
            }
        }


    }

  • 相关阅读:
    PHP登入
    PHP注册
    PHP数据访问
    php实现人员的权限管理
    PHP实现简单的评论与回复功能还有删除信息
    php文件的管理
    文件的操作
    文件上传及预览
    ajax分页
    三级联动
  • 原文地址:https://www.cnblogs.com/dxmfans/p/9434761.html
Copyright © 2011-2022 走看看