• 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;
            }
        }


    }

  • 相关阅读:
    检查点(Checkpoint)过程如何处理未提交的事务
    SQL Server代理(4/12):配置数据库邮件
    SQL Server代理(3/12):代理警报和操作员
    hash_multimap
    hash_map
    hash_multiset
    hash_set
    hash 函数
    pair
    multimap
  • 原文地址:https://www.cnblogs.com/dxmfans/p/9434762.html
Copyright © 2020-2023  润新知