首页 > Windows开发 > 详细

009-程序集路径Web窗体

时间:2017-01-14 18:44:49      阅读:256      评论:0      收藏:0      [点我收藏+]
 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     }

 

009-程序集路径Web窗体

原文:http://www.cnblogs.com/ninghongkun/p/6285808.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!