Merge pull request #2698 from esdrubal/iosxmlarray
[mono.git] / mcs / class / System.Web / System.Web.UI / Util.cs
1 //------------------------------------------------------------------------------
2 // <copyright file="Util.cs" company="Microsoft">
3 //     Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>
5 //------------------------------------------------------------------------------
6
7 /*
8  * Implements various utility functions used by the template code
9  *
10  * Copyright (c) 1998 Microsoft Corporation
11  */
12
13 namespace System.Web.UI {
14     using System;
15     using System.Collections;
16     using System.Collections.Specialized;
17     using System.ComponentModel;
18     using System.Diagnostics;
19     using System.Diagnostics.CodeAnalysis;
20     using System.Drawing;
21     using System.Globalization;
22     using System.IO;
23     using System.Reflection;
24     using System.Runtime.Serialization.Formatters;
25     using System.Security;
26     using System.Security.Permissions;
27     using System.Text;
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;
39
40 internal static class Util {
41
42     internal static string GetUrlWithApplicationPath(HttpContextBase context, string url) {
43         string appPath = context.Request.ApplicationPath ?? String.Empty;
44         if (!appPath.EndsWith("/", StringComparison.OrdinalIgnoreCase)) {
45             appPath += "/";
46         }
47
48         return context.Response.ApplyAppPathModifier(appPath + url);
49     }
50 }
51
52 }