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

推荐订阅源

G
Google Developers Blog
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
Martin Fowler
Martin Fowler
MyScale Blog
MyScale Blog
The GitHub Blog
The GitHub Blog
I
InfoQ
A
About on SuperTechFans
GbyAI
GbyAI
宝玉的分享
宝玉的分享
爱范儿
爱范儿
博客园 - 【当耐特】
博客园 - 司徒正美
博客园 - 聂微东
P
Proofpoint News Feed
WordPress大学
WordPress大学
云风的 BLOG
云风的 BLOG
Last Week in AI
Last Week in AI
阮一峰的网络日志
阮一峰的网络日志
B
Blog RSS Feed
Jina AI
Jina AI
aimingoo的专栏
aimingoo的专栏
J
Java Code Geeks
博客园 - 叶小钗

博客园 - Felix Liang

精进 Spring Boot 03:Spring Boot 的配置文件和配置管理,以及用三种方式读取配置文件 精进 Spring Boot 02 | Spring Boot 的文档结构、POM 文件格式的介绍,以及 Maven 的使用。 精进 Spring Boot 01 | Spring Boot 入门,用 Spring Boot 写第一个 Hello World How do I get started with Node.js 修改xampp的mysql默认密码和端口 Visual Studio 2013 错误系统找不到指定文件,0x80070002 Daily Build H公司数据同步的总结 VB2010新特性之——标识语言版本的新命令行选项/langversion (Visual Basic) 为什么开发人员不能估算时间? [翻译]SQL Server 未公开的两个存储过程sp_MSforeachtable 和 sp_MSforeachdb Lambda 表达式 Lambda Expressions (Visual Basic) 集合初始化器概览(Visual Basic) 宽松委托转换(Relaxed delegate conversion) VB2010 的隐式续行(Implicit Line Continuation) 自动实现属性 Visual Basic 2010 新特性 VS2008 Tips #009 – 您可以在 ASP.NET 的 Web.config 文件中注册用户控件 VS2008 Tips #008 如何创建ASP.NET Web 用户控件并包含在Web 页面中 - Felix Liang
获取应用程序的根Url - Felix Liang - 博客园
Felix Liang · 2011-02-21 · via 博客园 - Felix Liang

获取应用程序的根Url

 VB代码

    Public Function ApplicationRootUrl() As String
        
Dim req As HttpRequest = HttpContext.Current.Request
        
Return req.Url.GetLeftPart(System.UriPartial.Authority) + req.ApplicationPath & "/"
    
End Function'调用方式如下:
    ApplicationRootUrl() & "prg/if/ifShowMsgAddUp.aspx"
    
    
'结果:http://localhost:8010/iOffice/prg/if/ifShowMsgAddUp.aspx

 

posted @ 2011-02-21 18:22  Felix Liang  阅读(659)  评论(0)    收藏  举报