1 //------------------------------------------------------------------------------
2 // <copyright file="Util.cs" company="Microsoft">
3 // Copyright (c) Microsoft Corporation. All rights reserved.
5 //------------------------------------------------------------------------------
8 * Implements various utility functions used by the template code
10 * Copyright (c) 1998 Microsoft Corporation
13 namespace System.Web.UI {
15 using System.Collections;
16 using System.Collections.Specialized;
17 using System.ComponentModel;
18 using System.Diagnostics;
19 using System.Diagnostics.CodeAnalysis;
21 using System.Globalization;
23 using System.Reflection;
24 using System.Runtime.Serialization.Formatters;
25 using System.Security;
26 using System.Security.Permissions;
28 using System.Text.RegularExpressions;
29 using System.Web.Compilation;
30 using System.Web.Configuration;
31 using System.Web.Hosting;
32 using System.Web.Management;
33 using System.Web.Security;
34 //using System.Web.Security.Cryptography;
35 using System.Web.UI.WebControls;
36 using System.Web.Util;
37 using Microsoft.Win32;
38 //using Debug = System.Web.Util.Debug;
40 internal static class Util {
42 internal static string GetUrlWithApplicationPath(HttpContextBase context, string url) {
43 string appPath = context.Request.ApplicationPath ?? String.Empty;
44 if (!appPath.EndsWith("/", StringComparison.OrdinalIgnoreCase)) {
48 return context.Response.ApplyAppPathModifier(appPath + url);