검색결과 리스트
글
링크 : http://technet.rapaport.com/Info/LotUpload/SampleCode/WebClient_string.aspx
string UploadCSVString = @"StockNumber,Shape,Weight,Color,Clarity" +
Environment.NewLine + "1234Eli,Round,2.0,F,VVS1"; //CSV forma
string URLAuth = "https://technet.rapaport.com/HTTP/Authenticate.aspx";
WebClient webClient = new WebClient();
NameValueCollection formData = new NameValueCollection();
formData["Username"] = "myUser";
formData["Password"] = "myPassword";
byte[] responseBytes = webClient.UploadValues(URLAuth, "POST", formData);
string ResultAuthTicket = Encoding.UTF8.GetString(responseBytes);
webClient.Dispose();
string URL = "http://technet.rapaport.com/HTTP/Upload/Upload.aspx?Method=string";
formData.Clear();
formData["ticket"] = ResultAuthTicket;
formData["UploadCSVString"] = UploadCSVString;
formData["ReplaceAll"] = "false";
responseBytes = webClient.UploadValues(URL, "POST", formData);
string Result = Encoding.UTF8.GetString(responseBytes);
'.Net > .Net' 카테고리의 다른 글
[.Net] ServiceController (0) | 2013.04.18 |
---|---|
[.Net] Windows 서비스 만들기 (0) | 2013.04.17 |
[.Net] RSA 암호화 (0) | 2013.03.13 |
[.Net] EXE를 포함한 외부 DLL을 같이 배포하기 (0) | 2013.02.19 |
[.Net] Castle DynamicProxy Tutorial (0) | 2013.01.23 |
RECENT COMMENT