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

推荐订阅源

The Last Watchdog
The Last Watchdog
博客园 - 司徒正美
L
LangChain Blog
P
Proofpoint News Feed
阮一峰的网络日志
阮一峰的网络日志
V
V2EX
L
LINUX DO - 热门话题
Google DeepMind News
Google DeepMind News
Security Latest
Security Latest
Microsoft Security Blog
Microsoft Security Blog
Cyberwarzone
Cyberwarzone
Project Zero
Project Zero
M
MIT News - Artificial intelligence
NISL@THU
NISL@THU
C
CERT Recently Published Vulnerability Notes
Engineering at Meta
Engineering at Meta
T
Tenable Blog
C
Cybersecurity and Infrastructure Security Agency CISA
T
Troy Hunt's Blog
月光博客
月光博客
大猫的无限游戏
大猫的无限游戏
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Scott Helme
Scott Helme
Recent Announcements
Recent Announcements
S
Secure Thoughts
H
Hackread – Cybersecurity News, Data Breaches, AI and More
量子位
aimingoo的专栏
aimingoo的专栏
MyScale Blog
MyScale Blog
云风的 BLOG
云风的 BLOG
Hacker News - Newest:
Hacker News - Newest: "LLM"
雷峰网
雷峰网
Attack and Defense Labs
Attack and Defense Labs
A
About on SuperTechFans
Last Week in AI
Last Week in AI
T
Tailwind CSS Blog
Martin Fowler
Martin Fowler
V2EX - 技术
V2EX - 技术
S
Securelist
Microsoft Azure Blog
Microsoft Azure Blog
N
Netflix TechBlog - Medium
B
Blog RSS Feed
C
CXSECURITY Database RSS Feed - CXSecurity.com
D
DataBreaches.Net
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 叶小钗
T
The Blog of Author Tim Ferriss
PCI Perspectives
PCI Perspectives
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
H
Hacker News: Front Page

博客园 - 流泉飞石

转:ADO.Net Entity Framework : (七) 多條件查詢 转载:GridView 空记录时显示 Header 代码重构相关书籍 转:恢复Reflector反编译后资源文件的办法 WPF 回车转Tab实现跳转 C#自定义快捷键实现介绍 C#程序多用户只启动一个进程的方法[转载] C#中自定义快捷键【转载】 转:[WPF] WPF资源收集 分享 转:.NET开发人员必知的八个网站 WatermarkComboBox 和 WatermarkTextBox 转:c#中线程访问winform控件的若干问题 [转] DotNet资源站点汇总 DataKeyNames工作 - 流泉飞石 - 博客园 转:功能很强大的UIHelper类 转:动态修改webservice地址 转:CS结构软件自动升级实现 几个很好的url重写工具 SqlServer 查询sql执行时间
asp.net获取应用程序路径 - 流泉飞石 - 博客园
流泉飞石 · 2009-09-30 · via 博客园 - 流泉飞石

Code Snippet

  1. public static string ApplicationPath()
  2. {
  3.     string m_Application;
  4.     if (HttpContext.Current.Request.ApplicationPath.Equals("/"))
  5.     {
  6.         m_Application = "http://" + HttpContext.Current.Request.Url.Authority;
  7.     }
  8.     else
  9.         m_Application = HttpContext.Current.Request.ApplicationPath;
  10.     return m_Application;
  11. }

可以获取网站路径和虚拟目录路径

posted @ 2009-09-30 09:56  流泉飞石  阅读(511)  评论(0)    收藏  举报

刷新页面返回顶部