diff --git a/src/Microsoft.AspNet.WebUtilities/FormHelpers.cs b/src/Microsoft.AspNet.WebUtilities/FormHelpers.cs
index 17f8135465..4c16485eb0 100644
--- a/src/Microsoft.AspNet.WebUtilities/FormHelpers.cs
+++ b/src/Microsoft.AspNet.WebUtilities/FormHelpers.cs
@@ -1,4 +1,7 @@
-using System;
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System;
using Microsoft.AspNet.Http;
namespace Microsoft.AspNet.WebUtilities
diff --git a/src/Microsoft.AspNet.WebUtilities/QueryHelpers.cs b/src/Microsoft.AspNet.WebUtilities/QueryHelpers.cs
index 0b4de851bc..d31a250fdb 100644
--- a/src/Microsoft.AspNet.WebUtilities/QueryHelpers.cs
+++ b/src/Microsoft.AspNet.WebUtilities/QueryHelpers.cs
@@ -1,4 +1,9 @@
-using System;
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System;
+using System.Collections.Generic;
+using System.Text;
namespace Microsoft.AspNet.WebUtilities
{
@@ -16,5 +21,27 @@ namespace Microsoft.AspNet.WebUtilities
bool hasQuery = uri.IndexOf('?') != -1;
return uri + (hasQuery ? "&" : "?") + Uri.EscapeDataString(name) + "=" + Uri.EscapeDataString(value);
}
+
+ ///
+ /// Append the given query keys and values to the uri.
+ ///
+ /// The base uri.
+ /// A collection of name value query pairs to append.
+ /// The combine result.
+ public static string AddQueryString([NotNull] string uri, [NotNull] IDictionary queryString)
+ {
+ var sb = new StringBuilder();
+ sb.Append(uri);
+ bool hasQuery = uri.IndexOf('?') != -1;
+ foreach (var parameter in queryString)
+ {
+ sb.Append(hasQuery ? '&' : '?');
+ sb.Append(Uri.EscapeDataString(parameter.Key));
+ sb.Append('=');
+ sb.Append(Uri.EscapeDataString(parameter.Value));
+ hasQuery = true;
+ }
+ return sb.ToString();
+ }
}
}
\ No newline at end of file