最好的解决方法就是用我以前没有太注意过的方法Request.Params.GetValues( string name)。它返回的是一个数组,所以就不用担心逗号的问题了。

      string[] txtArr = Request.Params.GetValues("txt");

    这下就可以通过txtArr.length来获知有多少个name为“txt”的控件了,并能很方便的遍历各个控件的值。

posted on 2017-12-15 15:10  天涯浪子1955  阅读(186)  评论(0编辑  收藏  举报