﻿{"id":146,"date":"2010-05-25T00:52:18","date_gmt":"2010-05-24T16:52:18","guid":{"rendered":"http:\/\/nick.workao.org\/?p=146"},"modified":"2010-05-25T00:52:26","modified_gmt":"2010-05-24T16:52:26","slug":"%e7%94%a8-webclient-uploaddata-%e6%96%b9%e6%b3%95-%e4%b8%8a%e8%bd%bd%e6%96%87%e4%bb%b6%e6%95%b0%e6%8d%ae","status":"publish","type":"post","link":"http:\/\/nick.txtcc.com\/index.php\/win\/146","title":{"rendered":"\u7528 WebClient.UploadData \u65b9\u6cd5 \u4e0a\u8f7d\u6587\u4ef6\u6570\u636e"},"content":{"rendered":"<p>\u5047\u5982\u67d0\u7f51\u7ad9\u6709\u4e2a\u8868\u5355\uff0c\u4f8b\u5982(url: <a href=\"http:\/\/localhost\/login.aspx\">http:\/\/localhost\/login.aspx<\/a>)\uff1a<\/p>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\u5e10\u53f7<\/td>\n<td><input name=\"Username\"><\/td>\n<\/tr>\n<tr>\n<td>\u5bc6\u7801<\/td>\n<td><input name=\"Password\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6211\u4eec\u9700\u8981\u5728\u7a0b\u5e8f\u4e2d\u63d0\u4ea4\u6570\u636e\u5230\u8fd9\u4e2a\u8868\u5355\uff0c\u5bf9\u4e8e\u8fd9\u79cd\u8868\u5355\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528 WebClient.UploadData  \u65b9\u6cd5\u6765\u5b9e\u73b0\uff0c\u5c06\u6240\u8981\u4e0a\u4f20\u7684\u6570\u636e\u62fc\u6210\u5b57\u7b26\u5373\u53ef\uff0c\u7a0b\u5e8f\u5f88\u7b80\u5355\uff1a<\/p>\n<pre>\n<div><!--{12746335015270}-->string uriString = \"http:\/\/localhost\/login.aspx\";\n\/\/ \u521b\u5efa\u4e00\u4e2a\u65b0\u7684 WebClient \u5b9e\u4f8b.\nWebClient myWebClient = new WebClient();\nstring postData = \"Username=admin&Password=admin\";\n\/\/ \u6ce8\u610f\u8fd9\u79cd\u62fc\u5b57\u7b26\u4e32\u7684ContentType\nmyWebClient.Headers.Add(\"Content-Type\",\"application\/x-www-form-urlencoded\");\n\/\/ \u8f6c\u5316\u6210\u4e8c\u8fdb\u5236\u6570\u7ec4\nbyte[] byteArray = Encoding.ASCII.GetBytes(postData);\n\/\/ \u4e0a\u4f20\u6570\u636e\uff0c\u5e76\u83b7\u53d6\u8fd4\u56de\u7684\u4e8c\u8fdb\u5236\u6570\u636e.\nbyte[] responseArray = myWebClient.UploadData(uriString,\"POST\",byteArray);<\/div><\/pre>\n<p>\u5bf9\u4e8e\u6587\u4ef6\u4e0a\u4f20\u7c7b\u7684\u8868\u5355\uff0c\u4f8b\u5982(url: <a href=\"http:\/\/localhost\/uploadFile.aspx\">http:\/\/localhost\/uploadFile.aspx<\/a>)\uff1a<\/p>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\u6587\u4ef6<\/td>\n<td><input name=\"File\" type=\"file\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5bf9\u4e8e\u8fd9\u79cd\u8868\u5355\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528<\/p>\n<pre>\n<div><!--{12746335015271}-->String uriString = \"http:\/\/localhost\/uploadFile.aspx\";\n\n\/\/ \u521b\u5efa\u4e00\u4e2a\u65b0\u7684 WebClient \u5b9e\u4f8b.\nWebClient myWebClient = new WebClient();\n\nstring fileName = @\"C:upload.txt\";\n\n\/\/ \u76f4\u63a5\u4e0a\u4f20\uff0c\u5e76\u83b7\u53d6\u8fd4\u56de\u7684\u4e8c\u8fdb\u5236\u6570\u636e.\nbyte[] responseArray = myWebClient.UploadFile(uriString,\"POST\",fileName);<\/div><\/pre>\n<p>\u8fd8\u6709\u4e00\u79cd\u8868\u5355\uff0c\u4e0d\u4ec5\u6709\u6587\u5b57\uff0c\u8fd8\u6709\u6587\u4ef6\uff0c\u4f8b\u5982(url: <a href=\"http:\/\/localhost\/uploadData.aspx\">http:\/\/localhost\/uploadData.aspx<\/a>)\uff1a<\/p>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\u6587\u4ef6\u540d<\/td>\n<td><input name=\"filename\"><\/td>\n<\/tr>\n<tr>\n<td>\u6587\u4ef6<\/td>\n<td><input name=\"file\" type=\"file\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5bf9\u4e8e\u8fd9\u79cd\u8868\u5355\uff0c\u4f3c\u4e4e\u524d\u9762\u7684\u4e24\u79cd\u65b9\u6cd5\u90fd\u4e0d\u80fd\u9002\u7528\uff0c\u5bf9\u4e8e\u7b2c\u4e00\u79cd\u65b9\u6cd5\uff0c\u4e0d\u80fd\u76f4\u63a5\u62fc\u5b57\u7b26\u4e32\uff0c\u5bf9\u4e8e\u7b2c\u4e8c\u79cd\uff0c\u6211\u4eec\u53ea\u80fd\u4f20\u6587\u4ef6\uff0c\u91cd\u65b0\u56de\u5230\u7b2c\u4e00\u4e2a\u65b9\u6cd5\uff0c\u6ce8\u610f\u53c2\u6570\uff1a<\/p>\n<p>public byte[] UploadData(<\/p>\n<p>string address,<\/p>\n<p>string method,<\/p>\n<p>byte[] data<\/p>\n<p>);<\/p>\n<p>\u5728\u7b2c\u4e00\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u662f\u901a\u8fc7\u62fc\u5b57\u7b26\u4e32\u6765\u5f97\u5230byte[]  data\u53c2\u6570\u503c\u7684\uff0c\u5bf9\u4e8e\u8fd9\u79cd\u8868\u5355\u663e\u7136\u4e0d\u884c\uff0c\u53cd\u8fc7\u6765\u60f3\u60f3\uff0c\u5bf9\u4e8euploadData.aspx\u8fd9\u6837\u7684\u7a0b\u5e8f\u6765\u8bf4\uff0c\u76f4\u63a5\u901a\u8fc7\u7f51\u9875\u63d0\u4ea4\u6570\u636e\uff0c\u540e\u53f0\u6240\u83b7\u53d6\u5230\u7684\u6d41\u662f\u4ec0 \u4e48\u6837\u7684\u5462\uff1f\uff08\u5728\u6211\u4ee5\u524d\u7684\u4e00\u7bc7blog\u4e2d\uff0c\u66fe\u5206\u6790\u8fc7\u8fd9\u4e2a\u95ee\u9898\uff1a<\/p>\n<p><a id=\"viewpost.ascx_TitleUrl\" href=\"http:\/\/webuc.net\/dotey\/archive\/2004\/07\/22\/1334.aspx\"><span style=\"text-decoration: underline;\"><span style=\"color: #0000ff;\">asp\u65e0\u7ec4\u4ef6\u4e0a\u4f20\u8fdb\u5ea6\u6761\u89e3\u51b3\u65b9\u6848<\/span><\/span><\/a><\/p>\n<p>\uff09\uff0c\u6700\u7ec8\u7684\u6570\u636e\u5982\u4e0b\uff1a<\/p>\n<pre>-----------------------------7d429871607fe\nContent-Disposition: form-data; name=\"file1\"; filename=\"G:homepage.txt\"\nContent-Type: text\/plain\n\u5b9d\u7389\uff1ahttp:\/\/www.webuc.net\n-----------------------------7d429871607fe\nContent-Disposition: form-data; name=\"filename\"\ndefault filename\n-----------------------------7d429871607fe--\n<\/pre>\n<p>\u6240\u4ee5\u53ea\u8981\u62fc\u4e00\u4e2a\u8fd9\u6837\u7684byte[]  data\u6570\u636ePost\u8fc7\u53bb\uff0c\u5c31\u53ef\u4ee5\u8fbe\u5230\u540c\u6837\u7684\u6548\u679c\u4e86\u3002\u4f46\u662f\u4e00\u5b9a\u8981\u6ce8\u610f\uff0c\u5bf9\u4e8e\u8fd9\u79cd\u5e26\u6709\u6587\u4ef6\u4e0a\u4f20\u7684\uff0c\u5176ContentType\u662f\u4e0d\u4e00\u6837\u7684\uff0c\u4f8b\u5982\u4e0a\u9762\u7684\u8fd9\u79cd\uff0c\u5176  ContentType\u4e3a&#8221;multipart\/form-data;  boundary=&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;7d429871607fe&#8221;\u3002\u6709\u4e86ContentType\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u77e5\u9053   boundary(\u5c31\u662f\u4e0a\u9762\u7684&#8221;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;7d429871607fe&#8221;)\uff0c\u77e5\u9053boundary\u4e86\u6211\u4eec\u5c31  \u53ef\u4ee5\u6784\u9020\u51fa\u6211\u4eec\u6240\u9700\u8981\u7684byte[] data\u4e86\uff0c\u6700\u540e\uff0c\u4e0d\u8981\u5fd8\u8bb0\uff0c\u628a\u6211\u4eec\u6784\u9020\u7684ContentType\u4f20\u5230WebClient\u4e2d\uff08\u4f8b  \u5982:webClient.Headers.Add(&#8220;Content-Type&#8221;,  ContentType);\uff09\u8fd9\u6837\uff0c\u5c31\u53ef\u4ee5\u901a\u8fc7WebClient.UploadData \u65b9\u6cd5\u4e0a\u8f7d\u6587\u4ef6\u6570\u636e\u4e86\u3002<\/p>\n<p>\u5177\u4f53\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<p>\u751f\u6210\u4e8c\u8fdb\u5236\u6570\u636e\u7c7b\u7684\u5c01\u88c5<\/p>\n<pre>\n<div><!--{12746335015272}--><img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165221rqj.gif\" alt=\"\" align=\"top\">using System;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165221rqj.gif\" alt=\"\" align=\"top\">using System.Web;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165221rqj.gif\" alt=\"\" align=\"top\">using System.IO;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165221rqj.gif\" alt=\"\" align=\"top\">using System.Net;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165221rqj.gif\" alt=\"\" align=\"top\">using System.Text;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165221rqj.gif\" alt=\"\" align=\"top\">using System.Collections;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165221rqj.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165221rqj.gif\" alt=\"\" align=\"top\">namespace UploadData.Common\n<img decoding=\"async\" id=\"Codehighlighter_141_3716_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165222BLV.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_141_3716_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223pxm.gif\" alt=\"\" align=\"top\">...{\n<img decoding=\"async\" id=\"Codehighlighter_144_210_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_144_210_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">    \/**\/\/\/\/ <summary>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">    \/\/\/ \u521b\u5efaWebClient.UploadData\u65b9\u6cd5\u6240\u9700\u4e8c\u8fdb\u5236\u6570\u7ec4\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">    \/\/\/ <\/summary>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">    public class CreateBytes\n<img decoding=\"async\" id=\"Codehighlighter_238_3714_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_238_3714_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">    ...{\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        Encoding encoding = Encoding.UTF8;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" id=\"Codehighlighter_280_432_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_280_432_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">        \/**\/\/\/\/ <summary>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        \/\/\/ \u62fc\u63a5\u6240\u6709\u7684\u4e8c\u8fdb\u5236\u6570\u7ec4\u4e3a\u4e00\u4e2a\u6570\u7ec4\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        \/\/\/ <\/summary>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        \/\/\/ <param name=\"byteArrays\">\u6570\u7ec4<\/param>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        \/\/\/ <returns><\/returns>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">        \/\/\/ <remarks>\u52a0\u4e0a\u7ed3\u675f\u8fb9\u754c<\/remarks>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        public byte[] JoinBytes(ArrayList byteArrays)\n<img decoding=\"async\" id=\"Codehighlighter_483_941_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_483_941_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">        ...{\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            int length = 0;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            int readLength = 0;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ \u52a0\u4e0a\u7ed3\u675f\u8fb9\u754c\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            string endBoundary = Boundary + \"--rn\"; \/\/\u7ed3\u675f\u8fb9\u754c\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            byte[] endBoundaryBytes = encoding.GetBytes(endBoundary);\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            byteArrays.Add(endBoundaryBytes);\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            foreach(byte[] b in byteArrays)\n<img decoding=\"async\" id=\"Codehighlighter_730_759_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_730_759_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">            ...{\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">                length += b.Length;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">            }\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            byte[] bytes = new byte[length];\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ \u904d\u5386\u590d\u5236\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            foreach(byte[] b in byteArrays)\n<img decoding=\"async\" id=\"Codehighlighter_853_919_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_853_919_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">            ...{\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">                b.CopyTo(bytes, readLength);\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">                readLength += b.Length;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">            }\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            return bytes;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">        }\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        public bool UploadData(string uploadUrl, byte[] bytes, out byte[] responseBytes)\n<img decoding=\"async\" id=\"Codehighlighter_1029_1447_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_1029_1447_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">        ...{\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            WebClient webClient = new WebClient();\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            webClient.Headers.Add(\"Content-Type\", ContentType);\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            try\n<img decoding=\"async\" id=\"Codehighlighter_1139_1221_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_1139_1221_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">            ...{\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">                responseBytes = webClient.UploadData(uploadUrl, bytes);\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">                return true;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">            }\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            catch (WebException ex)\n<img decoding=\"async\" id=\"Codehighlighter_1253_1425_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_1253_1425_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">            ...{\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">                Stream resp = ex.Response.GetResponseStream();\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">                responseBytes = new byte[ex.Response.ContentLength];\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">                resp.Read(responseBytes, 0, responseBytes.Length);                \n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">            }\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            return false; \n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">        }\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" id=\"Codehighlighter_1454_1761_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_1454_1761_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">        \/**\/\/\/\/ <summary>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        \/\/\/ \u83b7\u53d6\u666e\u901a\u8868\u5355\u533a\u57df\u4e8c\u8fdb\u5236\u6570\u7ec4\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        \/\/\/ <\/summary>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        \/\/\/ <param name=\"fieldName\">\u8868\u5355\u540d<\/param>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        \/\/\/ <param name=\"fieldValue\">\u8868\u5355\u503c<\/param>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        \/\/\/ <returns><\/returns>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        \/\/\/ <remarks>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        \/\/\/ -----------------------------7d52ee27210a3crnContent-Disposition: form-data; name=\"\u8868\u5355\u540d\"rnrn\u8868\u5355\u503crn\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">        \/\/\/ <\/remarks>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        public byte[] CreateFieldData(string fieldName, string fieldValue)\n<img decoding=\"async\" id=\"Codehighlighter_1833_2069_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_1833_2069_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">        ...{\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            string textTemplate = Boundary + \"rnContent-Disposition: form-data; name=\"{0}\"rnrn{1}rn\";\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            string text = String.Format(textTemplate, fieldName, fieldValue);\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            byte[] bytes = encoding.GetBytes(text);\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            return bytes;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">        }\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        \n<img decoding=\"async\" id=\"Codehighlighter_2077_2374_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_2077_2374_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">        \/**\/\/\/\/ <summary>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        \/\/\/ \u83b7\u53d6\u6587\u4ef6\u4e0a\u4f20\u8868\u5355\u533a\u57df\u4e8c\u8fdb\u5236\u6570\u7ec4\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        \/\/\/ <\/summary>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        \/\/\/ <param name=\"fieldName\">\u8868\u5355\u540d<\/param>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        \/\/\/ <param name=\"filename\">\u6587\u4ef6\u540d<\/param>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        \/\/\/ <param name=\"contentType\">\u6587\u4ef6\u7c7b\u578b<\/param>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        \/\/\/ <param name=\"contentLength\">\u6587\u4ef6\u957f\u5ea6<\/param>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        \/\/\/ <param name=\"stream\">\u6587\u4ef6\u6d41<\/param>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">        \/\/\/ <returns>\u4e8c\u8fdb\u5236\u6570\u7ec4<\/returns>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        public byte[] CreateFieldData(string fieldName, string filename,string contentType, byte[] fileBytes)\n<img decoding=\"async\" id=\"Codehighlighter_2481_3130_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_2481_3130_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">        ...{\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            string end = \"rn\";\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            string textTemplate = Boundary + \"rnContent-Disposition: form-data; name=\"{0}\"; filename=\"{1}\"rnContent-Type: {2}rnrn\";\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ \u5934\u6570\u636e\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            string data = String.Format(textTemplate, fieldName, filename, contentType);\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            byte[] bytes = encoding.GetBytes(data);\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ \u5c3e\u6570\u636e\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            byte[] endBytes = encoding.GetBytes(end);\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ \u5408\u6210\u540e\u7684\u6570\u7ec4\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            byte[] fieldData = new byte[bytes.Length + fileBytes.Length + endBytes.Length];\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            bytes.CopyTo(fieldData, 0); \/\/ \u5934\u6570\u636e\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            fileBytes.CopyTo(fieldData, bytes.Length); \/\/ \u6587\u4ef6\u7684\u4e8c\u8fdb\u5236\u6570\u636e\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            endBytes.CopyTo(fieldData, bytes.Length + fileBytes.Length); \/\/ rn\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            return fieldData;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">        }\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" id=\"Codehighlighter_3136_3711_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_3136_3711_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\">        \u5c5e\u6027#region \u5c5e\u6027 <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        public string Boundary <img decoding=\"async\" id=\"Codehighlighter_3174_3460_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_3174_3460_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">        ...{ <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            get  <img decoding=\"async\" id=\"Codehighlighter_3187_3456_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_3187_3456_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">            ...{ <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">                string[] bArray, ctArray; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">                string contentType = ContentType; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">                ctArray = contentType.Split(';'); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">                if (ctArray[0].Trim().ToLower() == \"multipart\/form-data\") <img decoding=\"async\" id=\"Codehighlighter_3361_3434_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_3361_3434_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">                ...{ <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">                    bArray = ctArray[1].Split('='); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">                    return \"--\" + bArray[1]; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">                } <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">                return null; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">            } <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">        } <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\"> <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        public string ContentType <img decoding=\"async\" id=\"Codehighlighter_3493_3698_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_3493_3698_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">        ...{ <img decoding=\"async\" id=\"Codehighlighter_3502_3694_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_3502_3694_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">            get ...{ <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">                if (HttpContext.Current == null) <img decoding=\"async\" id=\"Codehighlighter_3545_3637_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_3545_3637_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">                ...{ <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">                    return \"multipart\/form-data; boundary=---------------------------7d5b915500cee\"; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">                } <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">                return HttpContext.Current.Request.ContentType; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">            } <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">        } <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">        #endregion\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">    }\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225VI9.gif\" alt=\"\" align=\"top\">}\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165221rqj.gif\" alt=\"\" align=\"top\"><\/div><\/pre>\n<p>\u5728Winform\u4e2d\u8c03\u7528<\/p>\n<pre>\n<div><!--{12746335015273}--><img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165221rqj.gif\" alt=\"\" align=\"top\">using System;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165221rqj.gif\" alt=\"\" align=\"top\">using System.Drawing;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165221rqj.gif\" alt=\"\" align=\"top\">using System.Collections;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165221rqj.gif\" alt=\"\" align=\"top\">using System.ComponentModel;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165221rqj.gif\" alt=\"\" align=\"top\">using System.Windows.Forms;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165221rqj.gif\" alt=\"\" align=\"top\">using System.Data;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165221rqj.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165221rqj.gif\" alt=\"\" align=\"top\">using UploadData.Common;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165221rqj.gif\" alt=\"\" align=\"top\">using System.IO;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165221rqj.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165221rqj.gif\" alt=\"\" align=\"top\">namespace UploadDataWin\n<img decoding=\"async\" id=\"Codehighlighter_206_7113_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165222BLV.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_206_7113_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223pxm.gif\" alt=\"\" align=\"top\">...{\n<img decoding=\"async\" id=\"Codehighlighter_209_260_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_209_260_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">    \/**\/\/\/\/ <summary>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">    \/\/\/ frmUpload \u7684\u6458\u8981\u8bf4\u660e\u3002\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">    \/\/\/ <\/summary>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">    public class frmUpload : System.Windows.Forms.Form\n<img decoding=\"async\" id=\"Codehighlighter_314_7111_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_314_7111_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">    ...{\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        private System.Windows.Forms.Label lblAmigoToken;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        private System.Windows.Forms.TextBox txtAmigoToken;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        private System.Windows.Forms.Label lblFilename;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        private System.Windows.Forms.TextBox txtFilename;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        private System.Windows.Forms.Button btnBrowse;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        private System.Windows.Forms.TextBox txtFileData;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        private System.Windows.Forms.Label lblFileData;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        private System.Windows.Forms.Button btnUpload;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        private System.Windows.Forms.OpenFileDialog openFileDialog1;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        private System.Windows.Forms.TextBox txtResponse;\n<img decoding=\"async\" id=\"Codehighlighter_841_887_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_841_887_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">        \/**\/\/\/\/ <summary>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        \/\/\/ \u5fc5\u9700\u7684\u8bbe\u8ba1\u5668\u53d8\u91cf\u3002\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">        \/\/\/ <\/summary>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        private System.ComponentModel.Container components = null;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        public frmUpload()\n<img decoding=\"async\" id=\"Codehighlighter_973_1102_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_973_1102_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">        ...{\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ Windows \u7a97\u4f53\u8bbe\u8ba1\u5668\u652f\u6301\u6240\u5fc5\u9700\u7684\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            InitializeComponent();\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ TODO: \u5728 InitializeComponent \u8c03\u7528\u540e\u6dfb\u52a0\u4efb\u4f55\u6784\u9020\u51fd\u6570\u4ee3\u7801\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">        }\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" id=\"Codehighlighter_1107_1156_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_1107_1156_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">        \/**\/\/\/\/ <summary>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        \/\/\/ \u6e05\u7406\u6240\u6709\u6b63\u5728\u4f7f\u7528\u7684\u8d44\u6e90\u3002\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">        \/\/\/ <\/summary>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        protected override void Dispose( bool disposing )\n<img decoding=\"async\" id=\"Codehighlighter_1211_1342_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_1211_1342_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">        ...{\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            if( disposing )\n<img decoding=\"async\" id=\"Codehighlighter_1235_1308_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_1235_1308_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">            ...{\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">                if (components != null) \n<img decoding=\"async\" id=\"Codehighlighter_1270_1303_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_1270_1303_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">                ...{\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">                    components.Dispose();\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">                }\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">            }\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            base.Dispose( disposing );\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">        }\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" id=\"Codehighlighter_1347_5205_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_1347_5205_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\">        Windows \u7a97\u4f53\u8bbe\u8ba1\u5668\u751f\u6210\u7684\u4ee3\u7801#region Windows \u7a97\u4f53\u8bbe\u8ba1\u5668\u751f\u6210\u7684\u4ee3\u7801 <img decoding=\"async\" id=\"Codehighlighter_1376_1451_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_1376_1451_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">        \/**\/\/\/\/ <summary> <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        \/\/\/ \u8bbe\u8ba1\u5668\u652f\u6301\u6240\u9700\u7684\u65b9\u6cd5 - \u4e0d\u8981\u4f7f\u7528\u4ee3\u7801\u7f16\u8f91\u5668\u4fee\u6539 <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        \/\/\/ \u6b64\u65b9\u6cd5\u7684\u5185\u5bb9\u3002 <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">        \/\/\/ <\/summary> <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        private void InitializeComponent() <img decoding=\"async\" id=\"Codehighlighter_1491_5192_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_1491_5192_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">        ...{ <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.lblAmigoToken = new System.Windows.Forms.Label(); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.txtAmigoToken = new System.Windows.Forms.TextBox(); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.lblFilename = new System.Windows.Forms.Label(); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.txtFilename = new System.Windows.Forms.TextBox(); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.btnBrowse = new System.Windows.Forms.Button(); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.txtFileData = new System.Windows.Forms.TextBox(); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.lblFileData = new System.Windows.Forms.Label(); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.btnUpload = new System.Windows.Forms.Button(); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.txtResponse = new System.Windows.Forms.TextBox(); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.SuspendLayout(); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/  <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ lblAmigoToken <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/  <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.lblAmigoToken.Location = new System.Drawing.Point(40, 48); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.lblAmigoToken.Name = \"lblAmigoToken\"; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.lblAmigoToken.Size = new System.Drawing.Size(72, 23); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.lblAmigoToken.TabIndex = 0; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.lblAmigoToken.Text = \"AmigoToken\"; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/  <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ txtAmigoToken <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/  <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.txtAmigoToken.Location = new System.Drawing.Point(120, 48); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.txtAmigoToken.Name = \"txtAmigoToken\"; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.txtAmigoToken.Size = new System.Drawing.Size(248, 21); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.txtAmigoToken.TabIndex = 1; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.txtAmigoToken.Text = \"\"; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/  <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ lblFilename <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/  <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.lblFilename.Location = new System.Drawing.Point(40, 96); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.lblFilename.Name = \"lblFilename\"; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.lblFilename.Size = new System.Drawing.Size(80, 23); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.lblFilename.TabIndex = 2; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.lblFilename.Text = \"Filename\"; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/  <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ txtFilename <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/  <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.txtFilename.Location = new System.Drawing.Point(120, 96); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.txtFilename.Name = \"txtFilename\"; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.txtFilename.Size = new System.Drawing.Size(248, 21); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.txtFilename.TabIndex = 3; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.txtFilename.Text = \"\"; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/  <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ btnBrowse <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/  <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.btnBrowse.Location = new System.Drawing.Point(296, 144); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.btnBrowse.Name = \"btnBrowse\"; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.btnBrowse.TabIndex = 4; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.btnBrowse.Text = \"\u6d4f\u89c8...\"; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/  <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ txtFileData <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/  <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.txtFileData.Location = new System.Drawing.Point(120, 144); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.txtFileData.Name = \"txtFileData\"; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.txtFileData.Size = new System.Drawing.Size(168, 21); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.txtFileData.TabIndex = 5; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.txtFileData.Text = \"\"; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/  <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ lblFileData <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/  <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.lblFileData.Location = new System.Drawing.Point(40, 144); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.lblFileData.Name = \"lblFileData\"; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.lblFileData.Size = new System.Drawing.Size(72, 23); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.lblFileData.TabIndex = 6; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.lblFileData.Text = \"FileData\"; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/  <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ btnUpload <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/  <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.btnUpload.Location = new System.Drawing.Point(48, 184); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.btnUpload.Name = \"btnUpload\"; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.btnUpload.TabIndex = 7; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.btnUpload.Text = \"Upload\"; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.btnUpload.Click += new System.EventHandler(this.btnUpload_Click); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/  <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ txtResponse <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/  <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.txtResponse.Location = new System.Drawing.Point(136, 184); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.txtResponse.Multiline = true; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.txtResponse.Name = \"txtResponse\"; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.txtResponse.Size = new System.Drawing.Size(248, 72); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.txtResponse.TabIndex = 8; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.txtResponse.Text = \"\"; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/  <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ frmUpload <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/  <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.AutoScaleBaseSize = new System.Drawing.Size(6, 14); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.ClientSize = new System.Drawing.Size(400, 269); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.Controls.Add(this.txtResponse); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.Controls.Add(this.btnUpload); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.Controls.Add(this.lblFileData); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.Controls.Add(this.txtFileData); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.Controls.Add(this.btnBrowse); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.Controls.Add(this.txtFilename); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.Controls.Add(this.lblFilename); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.Controls.Add(this.txtAmigoToken); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.Controls.Add(this.lblAmigoToken); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.Name = \"frmUpload\"; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.Text = \"frmUpload\"; <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            this.ResumeLayout(false); <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\"> <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">        } <img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">        #endregion\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" id=\"Codehighlighter_5210_5257_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_5210_5257_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">        \/**\/\/\/\/ <summary>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        \/\/\/ \u5e94\u7528\u7a0b\u5e8f\u7684\u4e3b\u5165\u53e3\u70b9\u3002\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">        \/\/\/ <\/summary>\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        [STAThread]\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        static void Main() \n<img decoding=\"async\" id=\"Codehighlighter_5296_5337_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_5296_5337_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">        ...{\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            Application.Run(new frmUpload());\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">        }\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        private void btnUpload_Click(object sender, System.EventArgs e)\n<img decoding=\"async\" id=\"Codehighlighter_5408_6918_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_5408_6918_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">        ...{\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ \u975e\u7a7a\u68c0\u9a8c\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            if (txtAmigoToken.Text.Trim() == \"\" || txtFilename.Text == \"\" || txtFileData.Text.Trim() == \"\")\n<img decoding=\"async\" id=\"Codehighlighter_5523_5581_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_5523_5581_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">            ...{\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">                MessageBox.Show(\"Please fill data\");\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">                return;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">            }\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ \u6240\u8981\u4e0a\u4f20\u7684\u6587\u4ef6\u8def\u5f84\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            string path = txtFileData.Text.Trim();\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ \u68c0\u67e5\u6587\u4ef6\u662f\u5426\u5b58\u5728\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            if (!File.Exists(path)) \n<img decoding=\"async\" id=\"Codehighlighter_5689_5756_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_5689_5756_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">            ...{\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">                MessageBox.Show(\"{0} does not exist!\", path);\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">                return;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">            }\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ \u8bfb\u6587\u4ef6\u6d41\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            FileStream fs = new FileStream(path, FileMode.Open,\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">                FileAccess.Read, FileShare.Read);\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ \u8fd9\u90e8\u5206\u9700\u8981\u5b8c\u5584\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            string ContentType = \"application\/octet-stream\";\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            byte[] fileBytes = new byte[fs.Length];\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            fs.Read(fileBytes, 0, Convert.ToInt32(fs.Length));\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ \u751f\u6210\u9700\u8981\u4e0a\u4f20\u7684\u4e8c\u8fdb\u5236\u6570\u7ec4\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            CreateBytes cb = new CreateBytes();\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ \u6240\u6709\u8868\u5355\u6570\u636e\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            ArrayList bytesArray = new ArrayList();\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ \u666e\u901a\u8868\u5355\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            bytesArray.Add(cb.CreateFieldData(\"FileName\", txtFilename.Text));\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            bytesArray.Add(cb.CreateFieldData(\"AmigoToken\", txtAmigoToken.Text));\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ \u6587\u4ef6\u8868\u5355\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            bytesArray.Add(cb.CreateFieldData(\"FileData\", path\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">                                                , ContentType, fileBytes));\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ \u5408\u6210\u6240\u6709\u8868\u5355\u5e76\u751f\u6210\u4e8c\u8fdb\u5236\u6570\u7ec4\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            byte[] bytes = cb.JoinBytes(bytesArray);\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ \u8fd4\u56de\u7684\u5185\u5bb9\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            byte[] responseBytes;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ \u4e0a\u4f20\u5230\u6307\u5b9aUrl\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            bool uploaded = cb.UploadData(\"http:\/\/localhost\/UploadData\/UploadAvatar.aspx\", bytes, out responseBytes);\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            \/\/ \u5c06\u8fd4\u56de\u7684\u5185\u5bb9\u8f93\u51fa\u5230\u6587\u4ef6\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            using (FileStream file = new FileStream(@\"c:response.text\", FileMode.Create, FileAccess.Write, FileShare.Read))\n<img decoding=\"async\" id=\"Codehighlighter_6777_6838_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_6777_6838_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">            ...{\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">                file.Write(responseBytes, 0, responseBytes.Length);\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">            }\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            txtResponse.Text = System.Text.Encoding.UTF8.GetString(responseBytes);\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">        }\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">        private void btnBrowse_Click(object sender, System.EventArgs e)\n<img decoding=\"async\" id=\"Codehighlighter_6989_7108_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_6989_7108_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">        ...{\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">            if(openFileDialog1.ShowDialog() == DialogResult.OK)\n<img decoding=\"async\" id=\"Codehighlighter_7049_7103_Open_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165223ISy.gif\" alt=\"\" align=\"top\"><img decoding=\"async\" id=\"Codehighlighter_7049_7103_Closed_Image\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224hOD.gif\" alt=\"\" align=\"top\">            ...{\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">                txtFileData.Text = openFileDialog1.FileName;\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">            }\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165224461.gif\" alt=\"\" align=\"top\">\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">        }\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225DrT.gif\" alt=\"\" align=\"top\">    }\n<img decoding=\"async\" src=\"http:\/\/nick.txtcc.com\/wp-content\/uploads\/remote_image\/2010\/05\/165225VI9.gif\" alt=\"\" align=\"top\">}<\/div><\/pre>","protected":false},"excerpt":{"rendered":"<p>\u5047\u5982\u67d0\u7f51\u7ad9\u6709\u4e2a\u8868\u5355\uff0c\u4f8b\u5982(url: <a href=\"http:\/\/localhost\/login.aspx\">http:\/\/localhost\/login.aspx<\/a>)\uff1a \u5e10\u53f7 \u5bc6\u7801 \u6211\u4eec\u9700\u8981\u5728\u7a0b\u5e8f\u4e2d\u63d0\u4ea4\u6570\u636e\u5230\u8fd9\u4e2a\u8868\u5355\uff0c\u5bf9\u4e8e\u8fd9\u79cd\u8868\u5355\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528 WebClient.Uplo&#46;&#46;&#46;<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[90,91],"class_list":["post-146","post","type-post","status-publish","format-standard","hentry","category-win","tag-webclient-uploaddata","tag-91"],"_links":{"self":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/146","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/comments?post=146"}],"version-history":[{"count":1,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/146\/revisions"}],"predecessor-version":[{"id":147,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/146\/revisions\/147"}],"wp:attachment":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/media?parent=146"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/categories?post=146"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/tags?post=146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}