• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
灬伊天?
博客园    首页    新随笔    联系   管理    订阅  订阅

009-程序集路径Web窗体

 1 <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="t1_HelloWorld.Index" %>
 2 <%@ Import Namespace="System.Reflection" %>
 3 
 4 <!DOCTYPE html>
 5 
 6 <html xmlns="http://www.w3.org/1999/xhtml">
 7 <head runat="server">
 8 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
 9     <title></title>
10 </head>
11 <body>
12     <form id="form1" runat="server">
13     <div>
14         <%=Path1 %>
15     <hr/>
16         <%=Assembly.GetExecutingAssembly().Location%>
17     </div>
18     </form>
19 </body>
20 </html>
1     public partial class Index : System.Web.UI.Page
2     {
3         protected string Path1 { get; set; }
4         protected void Page_Load(object sender, EventArgs e)
5         {
6             Path1=Assembly.GetExecutingAssembly().Location;
7             Response.Write("Hello World");
8         }
9     }

 

posted @ 2017-01-14 17:36  灬伊天☂  阅读(143)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3