Ejemplo n.º 1
0
        /// <summary>
        /// //图片media获取
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Button_Click_image(object sender, EventArgs e)
        {
            string a;
            string b;
            System.Collections.Specialized.NameValueCollection nc = new System.Collections.Specialized.NameValueCollection(Request.Form);
            Response.Write(nc.GetValues("image")[0].ToString());
            a = nc.GetValues("image")[0].ToString();

            StreamWriter sw = new StreamWriter(@"E:\程序库\image_text.txt");
            sw.WriteLine(a);
            sw.Flush();
            sw.Close();

            StreamReader sr = new StreamReader(@"E:\程序库\access_token.txt");
            b = sr.ReadLine();
            sr.Close();

            interfaceTest image_1 = new interfaceTest();
            image_1.Uploadfile(a, b, "image");
        }
Ejemplo n.º 2
0
 /// <summary>
 /// //获取Access_token
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Button_Click_Get_Access_token(object sender, EventArgs e)
 {
     interfaceTest a = new interfaceTest();
     a.Get_Access_token();
 }
Ejemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     interfaceTest b = new interfaceTest();
 }
Ejemplo n.º 4
0
 //Button调用interfaceTest中的函数
 protected void Unnamed_Click(object sender, EventArgs e)
 {
     interfaceTest a = new interfaceTest();
     a.shiyan();
 }
Ejemplo n.º 5
0
        /// <summary>
        /// //获取网页数据,调用后台方法生成Xml数据包
        /// //生成了“电子信息工程”按钮的回复Xml数据包
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Button_Click_text(object sender, EventArgs e)
        {
            string a;
            System.Collections.Specialized.NameValueCollection nc = new System.Collections.Specialized.NameValueCollection(Request.Form);
            a = nc.GetValues("text")[0].ToString();

            //获取下拉菜单中的当前数据
            string b;
            System.Collections.Specialized.NameValueCollection nc_1 = new System.Collections.Specialized.NameValueCollection(Request.Form);
            b = nc_1.GetValues("ComBox")[0].ToString();

            interfaceTest Xml_text = new interfaceTest();
            Xml_text.Establish_Xml(a, b);
        }