本文整理汇总了C#中System.Web.HttpBrowserCapabilities.SetFieldValue方法的典型用法代码示例。如果您正苦于以下问题:C# HttpBrowserCapabilities.SetFieldValue方法的具体用法?C# HttpBrowserCapabilities.SetFieldValue怎么用?C# HttpBrowserCapabilities.SetFieldValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.HttpBrowserCapabilities
的用法示例。
在下文中一共展示了HttpBrowserCapabilities.SetFieldValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HttpContextProxy
public HttpContextProxy(String fileName, String queryString)
: base()
{
MemoryStream responseStream = new MemoryStream();
TextWriter responseWriter = new StreamWriter(responseStream);
HttpWorkerRequest wr = new SimpleWorkerRequest("/", @"C:\inetpub\wwwroot\", fileName, queryString, responseWriter);
HttpContext context = new HttpContext(wr);
HttpBrowserCapabilities browser = new HttpBrowserCapabilities();
browser.SetFieldValue("_items", new Hashtable());
context.Request.Browser = browser;
HttpContext previousContext = HttpContext.Current;
HttpContext.Current = context;
this._context = context;
this._previousContext = previousContext;
this._responseStream = responseStream;
this._responseWriter = responseWriter;
IHttpSessionState container = new HttpSessionStateContainer(Guid.NewGuid().ToString(), new SessionStateItemCollection(), new HttpStaticObjectsCollection(), 20, true, HttpCookieMode.AutoDetect, SessionStateMode.InProc, false);
this.SetSessionState(container);
}