惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
小众软件
小众软件
博客园_首页
T
Tailwind CSS Blog
美团技术团队
博客园 - 叶小钗
Microsoft Security Blog
Microsoft Security Blog
有赞技术团队
有赞技术团队
Apple Machine Learning Research
Apple Machine Learning Research
大猫的无限游戏
大猫的无限游戏
Microsoft Azure Blog
Microsoft Azure Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
InfoQ
MongoDB | Blog
MongoDB | Blog
The Cloudflare Blog
J
Java Code Geeks
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东
酷 壳 – CoolShell
酷 壳 – CoolShell
Blog — PlanetScale
Blog — PlanetScale
IT之家
IT之家
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Y
Y Combinator Blog

博客园 - openkava

我的天涯助手V1 微软asp.net 2.0 rdlc报表发布到虚拟主机上 - openkava 恶意脚本代码分析 - openkava - 博客园 自用aspx小工具 cmd.aspx v1.2 aspx最小代码连接数据库 数据库连接字符串 - openkava - 博客园 Jquery 使用笔记1 - openkava - 博客园 c# 乱码解决方法 - openkava - 博客园 test zz巧用三个SQL视图查出所有的数据库字典 01 DiscuzNT1.0安装 编写的一个简单的ashx小程序 用bat文件搞定文件的备份 zz习惯的力量:35岁以前养成好习惯 竟然有免费送书的好事啊 Log4Net 使用心得 .net remoting 传递令牌 zz一篇很好的编码原理的文章 comesmith 4.1 试用笔记-
c# aspx 动态编译文件模板 - openkava
openkava · 2008-06-26 · via 博客园 - openkava

模板一:
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<html>
<body>
<script language="C#" runat="server">

   Response.Write("hello"); 

</script>   
    
</body>
</html>
模板二:

<%@ Page Language="C#" %>
<% @Import Namespace="System.Drawing" %>
<% @Import Namespace="System.IO" %>
<% @Import Namespace="System.Drawing.Imaging" %>
<HTML>
    <HEAD>
        <title>test</title>
       
    </HEAD>
    <body>
        <%         
           StringBuilder str =new StringBuilder();
           //str.Append("<html><head><title> test</title></head><body>");
         
         
          str.Append(" <h1> <div> hello world !!!</div></h1>");
        //str.Append("<script>alert('hello')</script>");
         
 
           System.IO.DirectoryInfo d= new DirectoryInfo("c:/");//Server.MapPath(".")
             System.IO.FileInfo[] f = d.GetFiles();

            foreach(FileSystemInfo  ff in d.GetFileSystemInfos())
            {
                //str.Append(ff.FullName+"-----------" + ff.Extension+ff.Name+"<br/>");
            }
       str.Append( Request.UserHostAddress);
          str.Append(this.Request.UserAgent);
          string s=this.Request.ServerVariables.ToString();
         
           str.Append(      s                 );
      
          //str.Append("</body></html>");
     
      Response.Expires = 0;
      Response.ClearContent();
      Response.ContentType = "text/html";
      Response.Write(str.ToString());
      Response.End();
     
 
  
  %>
         
    </body>
</HTML>