堕落的卖猪贩-做人就象做诗,一旦上了境界,就下不来了。

我的Ber客我作主,今天你Ber没有。

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

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

 

        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>");
                }
            }

        }
posted on 2006-03-17 20:05  堕落的卖猪贩  阅读(254)  评论(0编辑  收藏  举报