1. 程式人生 > >[C#]使用WebClient上傳檔案並同時Post表單資料欄位到服務端

[C#]使用WebClient上傳檔案並同時Post表單資料欄位到服務端

{
            
this.lblAmigoToken =new System.Windows.Forms.Label();
            
this.txtAmigoToken =new System.Windows.Forms.TextBox();
            
this.lblFilename =new System.Windows.Forms.Label();
            
this.txtFilename =new System.Windows.Forms.TextBox();
            
this.btnBrowse =new
 System.Windows.Forms.Button();
            
this.txtFileData =new System.Windows.Forms.TextBox();
            
this.lblFileData =new System.Windows.Forms.Label();
            
this.btnUpload =new System.Windows.Forms.Button();
            
this.openFileDialog1 =new System.Windows.Forms.OpenFileDialog();
            
this.txtResponse =new System.Windows.Forms.TextBox();
            
this.SuspendLayout();
            
// 
            
// lblAmigoToken
            
//
this.lblAmigoToken.Location =new System.Drawing.Point(4048);
            
this.lblAmigoToken.Name ="lblAmigoToken";
            
this.lblAmigoToken.Size 
=new System.Drawing.Size(7223);
            
this.lblAmigoToken.TabIndex =0;
            
this.lblAmigoToken.Text ="AmigoToken";
            
// 
            
// txtAmigoToken
            
//
this.txtAmigoToken.Location =new System.Drawing.Point(12048);
            
this.txtAmigoToken.Name ="txtAmigoToken";
            
this.txtAmigoToken.Size =new System.Drawing.Size(24821);
            
this.txtAmigoToken.TabIndex =1;
            
this.txtAmigoToken.Text ="";
            
// 
            
// lblFilename
            
//
this.lblFilename.Location =new System.Drawing.Point(4096);
            
this.lblFilename.Name ="lblFilename";
            
this.lblFilename.Size =new System.Drawing.Size(8023);
            
this.lblFilename.TabIndex =2;
            
this.lblFilename.Text ="Filename";
            
// 
            
// txtFilename
            
//
this.txtFilename.Location =new System.Drawing.Point(12096);
            
this.txtFilename.Name ="txtFilename";
            
this.txtFilename.Size =new System.Drawing.Size(24821);
            
this.txtFilename.TabIndex =3;
            
this.txtFilename.Text ="";
            
// 
            
// btnBrowse
            
//
this.btnBrowse.Location =new System.Drawing.Point(296144);
            
this.btnBrowse.Name ="btnBrowse";
            
this.btnBrowse.TabIndex =4;
            
this.btnBrowse.Text ="瀏覽";
            
this.btnBrowse.Click +=new System.EventHandler(this.btnBrowse_Click);
            
// 
            
// txtFileData
            
//
this.txtFileData.Location =new System.Drawing.Point(120144);
            
this.txtFileData.Name ="txtFileData";
            
this.txtFileData.Size =new System.Drawing.Size(16821);
            
this.txtFileData.TabIndex =5;
            
this.txtFileData.Text ="";
            
// 
            
// lblFileData
            
//
this.lblFileData.Location =new System.Drawing.Point(40144);
            
this.lblFileData.Name ="lblFileData";
            
this.lblFileData.Size =new System.Drawing.Size(7223);
            
this.lblFileData.TabIndex =6;
            
this.lblFileData.Text ="FileData";
            
// 
            
// btnUpload
            
//
this.btnUpload.Location =new System.Drawing.Point(48184);
            
this.btnUpload.Name ="btnUpload";
            
this.btnUpload.TabIndex =7;
            
this.btnUpload.Text ="Upload";
            
this.btnUpload.Click +=new System.EventHandler(this.btnUpload_Click);
            
// 
            
// txtResponse
            
//
this.txtResponse.Location =new System.Drawing.Point(136184);
            
this.txtResponse.Multiline =true;
            
this.txtResponse.Name ="txtResponse";
            
this.txtResponse.Size =new System.Drawing.Size(24872);
            
this.txtResponse.TabIndex =8;
            
this.txtResponse.Text ="";
            
// 
            
// frmUpload
            
//
this.AutoScaleBaseSize =new System.Drawing.Size(614);
            
this.ClientSize =new System.Drawing.Size(400269);
            
this.Controls.Add(this.txtResponse);
            
this.Controls.Add(this.btnUpload);
            
this.Controls.Add(this.lblFileData);
            
this.Controls.Add(this.txtFileData);
            
this.Controls.Add(this.btnBrowse);
            
this.Controls.Add(this.txtFilename);
            
this.Controls.Add(this.lblFilename);
            
this.Controls.Add(this.txtAmigoToken);
            
this.Controls.Add(this.lblAmigoToken);
            
this.Name ="frmUpload";
            
this.Text ="frmUpload";
            
this.ResumeLayout(false);

        }