using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;
using System.IO;

public partial class member_Api_V5Shop_UserApi : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        File.WriteAllText(Server.MapPath("aaa.txt"), "fdsfdsfdsds");
        string code = "sdkfdsjj$#12r90dfjs@1*&()_^&0fdjs";
        Response.Redirect("../InfoCenter/InfoCenterApi.aspx?key=User&code=" + code + "&app=V5Shop&" + collectQuery());
    }

    /// <summary>
    /// 合并传递的QUERYSTRING字符串
    /// </summary>
    /// <returns></returns>
    private string collectQuery()
    {
        StringBuilder queryString = new StringBuilder();
        int i = 0;

        foreach (string query in Request.QueryString)
        {
            if (i == 0)
            {
                queryString.Append(query + "=" + HttpUtility.HtmlEncode(Request.QueryString[query]));
                i = 1;
            }
            else
            {
                queryString.Append("&" + query + "=" + HttpUtility.HtmlEncode(Request.QueryString[query]));
            }
        }

        return queryString.ToString();
    }
}
