码迷,mamicode.com
首页 > Windows程序 > 详细

009-程序集路径Web窗体

时间:2017-01-14 18:45:21      阅读:266      评论:0      收藏:0      [点我收藏+]

标签:htm   pre   title   type   span   names   write   ons   asp   

 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窗体

标签:htm   pre   title   type   span   names   write   ons   asp   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!