日期:2014-05-20 浏览次数:20644 次
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace MTC.Web.Aspx
{
public partial class Test : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string allSelectField = "48,49,-48,50,-48,51,-|45,46,-45,47,-|2,3,-2,4,-2,5,-2,29,-2,30,-2,31,-2,32,-2,33,-2,34,-2,35,-2,36,-2,37,-|1,6,-
1,7,-1,52,-1,53,-|8,9,-8,10,-8,11,-|38,39,-38,40,-38,41,-|42,43,-42,44,-|";
allSelectField = allSelectField.Replace(",-|", "|");
allSelectField = allSelectField.Replace(",-", "-");
allSelectField = allSelectField.Substring(0,allSelectField.Length - 1);
string[] groupArray = allSelectField.Split('|'); //组数组
string[] fieldArray; //大类数组
string[] SmallFieldArray; //小类数组
string url = "50-46-29"; //提交的查询URL
string[] urlArray = url.Split('-'); //URL数组
Response.Write("URL is:" + url + "<br />");
for (int i = 0; i < groupArray.Length; i++) //遍历组
{
fieldArray = groupArray[i].Split('-');
for (int ii = 0; ii < fieldArray.Length; ii++)//遍历大类
{
SmallFieldArray = fieldArray[ii].Split(',');
Response.Write(myTest2(url, urlArray, SmallFieldArray, fieldArray[ii], groupArray[i]));
}
}
}
/// <summary>
///
/// </summary>