Chào mừng các bạn đến với khóa học LẬP TRÌNH HTTP REQUEST VỚI C#, khóa học đầu tiên trong cụm khóa học về Auto C# của Howkteam. Mục đích hướng tới là các bạn có thể làm auto bằng C# mà không cần dùng tới các ngôn ngữ như AutoIT, C++,…
Ở bài trước chúng ta đã tìm hiểu về cách POST DATA LOGIN HOWKTEAM DÙNG HTTP REQUEST. Trong bài này chúng ta sẽ tiếp tục tìm hiểu cách Upload file với C# dùng Http Request
Nội dung
Nội dung bao gồm Source code & các lưu ý chính về quá trình thực hiện phần mềm. Kteam khuyến khích bạn cập nhập thêm nhiều kinh nghiệm cũng như hiểu chi tiết hơn về các kỹ thuật được đề cập trong bài học thông qua các video đính kèm.
Đừng quên Like Facebook hoặc +1 Google để ủng hộ Kteam và tác giả.
Để có đủ khả năng học hiểu các nội dung được đề cập đến trong khóa học. Bạn nên có tối thiểu kiến thức về các phần:
namespace HttpRequest_Bai1_GetDataFrom_HowKteam
{
partial class Form1
{
///<summary>/// Required designer variable.///</summary>private System.ComponentModel.IContainer components = null;
///<summary>/// Clean up any resources being used.///</summary>///<param name="disposing">true if managed resources should be disposed; otherwise, false.</param>protectedoverridevoidDispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code///<summary>/// Required method for Designer support - do not modify/// the contents of this method with the code editor.///</summary>privatevoidInitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.SuspendLayout();
// // button1// this.button1.Location = new System.Drawing.Point(12, 12);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 0;
this.button1.Text = "Get data";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
// // button2// this.button2.Location = new System.Drawing.Point(93, 12);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(122, 23);
this.button2.TabIndex = 1;
this.button2.Text = "Get data with cookie";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
// // button3// this.button3.Location = new System.Drawing.Point(221, 12);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(114, 23);
this.button3.TabIndex = 2;
this.button3.Text = "Post đăng nhập";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
// // button4// this.button4.Location = new System.Drawing.Point(341, 12);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(75, 23);
this.button4.TabIndex = 3;
this.button4.Text = "Upload file";
this.button4.UseVisualStyleBackColor = true;
this.button4.Click += new System.EventHandler(this.button4_Click);
// // Form1// this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(432, 191);
this.Controls.Add(this.button4);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
}
#endregionprivate System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
Project tải xuống
Nếu việc thực hành theo hướng dẫn không diễn ra suôn sẻ như mong muốn. Bạn cũng có thể tải xuống PROJECT THAM KHẢO ở link bên dưới!
Phần mềm & Thư viện khác
Kết
Trong bài này, chúng ta đã tìm hiểu cách Upload file với C# dùng Http Request
Ở bài sau, Kteam sẽ giới thiệu đến bạn cách VƯỢT NORMAL CAPTCHA VTC VỚI C# DÙNG HTTP REQUEST
Cảm ơn các bạn đã theo dõi bài viết. Hãy để lại bình luận hoặc góp ý của mình để phát triển bài viết tốt hơn. Và đừng quên “Luyện tập – Thử Thách – Không ngại khó”
Tải xuống
Tài liệu
Nhằm phục vụ mục đích học tập Offline của cộng đồng, Kteam hỗ trợ tính năng lưu trữ nội dung bài học Upload file với C# dùng Http Request dưới dạng file PDF trong link bên dưới.
Ngoài ra, bạn cũng có thể tìm thấy các tài liệu được đóng góp từ cộng đồng ở mục TÀI LIỆU trên thư viện Howkteam.com
Đừng quên like và share để ủng hộ Kteam và tác giả nhé!
Thảo luận
Nếu bạn có bất kỳ khó khăn hay thắc mắc gì về khóa học, đừng ngần ngại đặt câu hỏi trong phần bên dưới hoặc trong mục HỎI & ĐÁP trên thư viện Howkteam.com để nhận được sự hỗ trợ từ cộng đồng.
cái trang uploadfiles.io nó đổi mã nguồn rồi các anh em ạ :(( mần cả đêm mới ra :((
Sai rồi a ơi. Chỗ new StringContent() sai hết