How to post a file via HTTP post in vb.net

前端 未结 4 520
慢半拍i
慢半拍i 2020-12-05 03:47

Having a problem with sending a file via HTTP post in vb.net. I am trying to mimic the following HTML so the vb.net does the same thing.

4条回答
  •  情书的邮戳
    2020-12-05 04:17

    You could use the

    E.g:

    In ASPX:
    
    
    In Code Behind:
    if(flUpload.HasFile)
    {
      string filepath = flUpload.PostedFile.FileName;
      flUpload.PostedFile.SaveAs(Server.MapPath(".\\") + file)
    }
    

提交回复
热议问题