推荐文章

c#去除字符串中的空格,回车,换行符,制表符

c#去除字符串中的空格,回车,换行符,制表符

c#去除字符串中的空格,回车,换行符,制表符
C#监控程序启动和关闭

C#监控程序启动和关闭

C#监控程序启动和关闭using System;using System.Collections.Generic;using System.Text;using System.Diagnostics;using System.Threading;namespace ProcessListener{ class Program { static void Main(stri
C#操作USB口的摄像头

C#操作USB口的摄像头

private const uint BM_CLICK = 0xF5; 鼠标点击的消息,对于各种消息的数值,查API手册,也可用VS2010自带的SPY++ [DllImpt("user32.dll", EntryPoint = "SendMessage", SetLastErr = true, Set = Set.Auto)]private static extern int SendMe
C# FTP操作

C# FTP操作

C# FTP操作
C#文件监控对象FileSystemWatcher

C#文件监控对象FileSystemWatcher

使用C#文件监控对象FileSystemWatcher对文件夹下的删除、修改、新增

c#的HttpContext.Current.Request一些常见属性信息的内容

日期:2018-07-08 点击:2983 来源:PB2.CN
StringBuilder strBuider = new StringBuilder();
strBuider.Append("客户端主机的IP地址:" + HttpContext.Current.Request.UserHostAddress + "</br>");
strBuider.Append("客户端浏览器版本:" + Request.UserAgent + "</br>");
strBuider.Append("当前由哪个页面URL跳转过来:" + Request.UrlReferrer+ "</br>");
strBuider.Append("当前要求的URL:" + Request.Url + "</br>");
strBuider.Append("当前要求的URL绝对地址:" + Request.Url.AbsolutePath + "</br>");
strBuider.Append("当前要求的URL绝对URI:" + Request.Url.AbsoluteUri + "</br>");
strBuider.Append("当前要求的URL主机名跟端口:" + Request.Url.Authority + "</br>");
strBuider.Append("当前要求的URL实例主机的一部分:" + Request.Url.Host + "</br>");
strBuider.Append("当前要求的URL端口:" + Request.Url.Port + "</br>");
strBuider.Append("当前要求的URL的内容第一个段:" + Request.Url.Segments[0] + "</br>");
strBuider.Append("当前要求的URL的内容第二个段:" + Request.Url.Segments[1] + "</br>");
strBuider.Append("当前要求的URL的内容第三个段:" + Request.Url.Segments[2] + "</br>");
strBuider.Append("浏览器地址栏后的参数"+Request.QueryString + "</br>");
strBuider.Append("当前网页在服务器端的实际路径:" + Request.PhysicalPath + "</br>");
strBuider.Append("当前文件的物理地址:" + Request.PhysicalApplicationPath + "</br>");
strBuider.Append("当前网页的相对地址:" + Request.Path + "<br/>");
strBuider.Append("当前页面的URL:" + Request.RawUrl + "<br/>");
strBuider.Append("客户端上传的文件(个数):" + Request.Files.Count + "<br/>");
strBuider.Append("当前执行网页的相对地址:" + Request.FilePath + "<br/>");
strBuider.Append("客户端浏览器的信息:" + Request.Browser + "<br/>");
strBuider.Append("当前运行程序的服务器端虚拟目录:" + Request.ApplicationPath + "<br/>");
strBuider.Append("客户端浏览器的字符设置:" + Request.ContentEncoding + "<br/>");
Response.Write(strBuider.ToString());


这篇文档对您是否有帮助?

c#去除字符串中的空格,回车,换行符,制表符

c#去除字符串中的空格,回车,换行符,制表符

c#去除字符串中的空格,回车,换行符,制表符
C#监控程序启动和关闭

C#监控程序启动和关闭

C#监控程序启动和关闭using System;using System.Collections.Generic;using System.Text;using System.Diagnostics;using System.Threading;namespace ProcessListener{ class Program { static void Main(stri
C#操作USB口的摄像头

C#操作USB口的摄像头

private const uint BM_CLICK = 0xF5; 鼠标点击的消息,对于各种消息的数值,查API手册,也可用VS2010自带的SPY++ [DllImpt("user32.dll", EntryPoint = "SendMessage", SetLastErr = true, Set = Set.Auto)]private static extern int SendMe
C# FTP操作

C# FTP操作

C# FTP操作
C#文件监控对象FileSystemWatcher

C#文件监控对象FileSystemWatcher

使用C#文件监控对象FileSystemWatcher对文件夹下的删除、修改、新增