zoukankan      html  css  js  c++  java
  • 查看ServerVariables集合

    要看集合里有哪些东西,才知道获取里面的东西。

            private void Page_Load(object sender, System.EventArgs e)
            {
                
    // 在此处放置用户代码以初始化页面
                
    //System.Collections.Specialized.NameObjectCollectionBase m = Request.ServerVariables;
                int loop1, loop2;
                
    // Load ServerVariable collection into NameValueCollection object.
                System.Collections.Specialized.NameValueCollection coll=Request.ServerVariables; 
                
    // Get names of all keys into a string array. 
                String[] arr1 = coll.AllKeys; 
                
    for (loop1 = 0; loop1 < arr1.Length; loop1++
                {
                    Response.Write(
    "Key: " + arr1[loop1] + "<br>");
                    String[] arr2
    =coll.GetValues(arr1[loop1]);
                    
    for (loop2 = 0; loop2 < arr2.Length; loop2++
                    {
                        Response.Write(
    "Value " + loop2 + "" + Server.HtmlEncode(arr2[loop2]) + "<br>");
                    }
                }

            }
  • 相关阅读:
    redmineBUG系统
    MySQL错误代码
    一篇文章全面了解监控知识体系
    K2 blackpearl 流程开发(一)
    HTTP 协议详解
    http协议学习系列
    浅谈HTTP中Get与Post的区别
    iOS应用程序生命周期(前后台切换,应用的各种状态)详解
    深入浅出 iOS 之生命周期
    iOS-利用AFNetworking(AFN 1.x)-实现文件上传
  • 原文地址:https://www.cnblogs.com/zkxp/p/352391.html
Copyright © 2011-2022 走看看