using System; using System.Collections.Generic; using System.Collections.Specialized; using System.Linq; using System.Text; using System.Web; using Bowin.Common; namespace EMIS.Utility { public class HttpHelper { public static string GetMenuNo() { try { var menuNo = HttpContext.Current.Request["MNU"]; if (string.IsNullOrEmpty(menuNo)) { menuNo = HttpContext.Current.Request.UrlReferrer.GetQueryStringByPath("MNU"); } return menuNo; } catch { return "WINFORM"; } } public static SortedDictionary GetRequestPost() { int i = 0; SortedDictionary sArray = new SortedDictionary(); NameValueCollection coll; //Load Form variables into NameValueCollection variable. coll = HttpContext.Current.Request.Form; // Get names of all forms into a string array. String[] requestItem = coll.AllKeys; for (i = 0; i < requestItem.Length; i++) { sArray.Add(requestItem[i], HttpContext.Current.Request.Form[requestItem[i]]); } return sArray; } } }