using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Collections.Specialized; using System.Text; // ASP.NET [C#] REDIRECT WITH POST DATA public static class WebExtensions { public static void RedirectWithData(NameValueCollection data, string url) { HttpResponse response = HttpContext.Current.Response; response.Clear(); StringBuilder s = new StringBuilder(); s.Append(""); s.AppendFormat(""); s.AppendFormat("
", url); foreach (string key in data) { s.AppendFormat("", key, data[key]); } s.Append("
"); response.Write(s.ToString()); response.End(); } }