Page.ResolveUrl
<%@ Page Language="vb" %> <html> <head> <title>ResolveUrl method example</title> <script runat="server"> Sub Page_Load() Message.Text = Page.ResolveUrl("global.asax") End Sub </script> </head> <body> <asp:label id="Message" runat="server"/> </body> </html>