zoukankan      html  css  js  c++  java
  • ASP FirstWeb

    //html

    <!DOCTYPE html>

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <title></title>
    <meta charset="utf-8" />
    </head>
    <body>
        <table>
            <tr>
                <td>用户名</td>
                <td>$UserName</td>
            </tr>
            <tr>
                <td>密码</td>
                <td>$UserPwd</td>
            </tr>
        </table>
    </body>

    </html>


    //.ashx

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


    using System;
    using System.Web;


    public class List : IHttpHandler {


        public void ProcessRequest (HttpContext context) {
            context.Response.ContentType = "text/html";
            string filePath = context.Request.MapPath("List.html");
            string fileContent = System.IO.File.ReadAllText(filePath);
            fileContent = fileContent.Replace("$UserName", "zhangsan").Replace("$UserPwd", "123456");
            context.Response.Write(fileContent);



        }


        public bool IsReusable {
            get {
                return false;
            }
        }


    }

  • 相关阅读:
    javascript基础01
    javascript基础02
    javascript基础03
    javascript基础04
    javascript基础05
    javascript基础06
    Android 实现截屏功能
    android 获取摄像头像素
    c# Winform dataGridView动态添加行
    Android 读取Assets下的文件
  • 原文地址:https://www.cnblogs.com/dxmfans/p/9434762.html
Copyright © 2011-2022 走看看