You must Sign In to post a response.
  • Category: Windows

    Uploading a file in windowsapplication vb.net

    Dear Friend

    I would like to upload a file in windows vb.net application

    i wana to save in my application

    thnx in advance
  • #350812
    http://ashrafur.wordpress.com/2008/01/06/upload-file-using-cnet/

  • #350829
    hi,

    there is no file upload control like asp in windows application..

    so to do so u can use the Open or Save FileDialog Box to select the file and to save it in the machine..

    please refer the following code for this..



    OpenFileDialog openFileDialog1 = new OpenFileDialog();
    openFileDialog1.Filter = "Excel Files|*.xls";
    openFileDialog1.Title = "Select a EXCEL File";

    if (openFileDialog1.ShowDialog() == DialogResult.OK)
    {
    btnOk.Enabled = true;
    txtSourcePath .Text= openFileDialog1.FileName;
    }



    Thanks & Regards
    Anil Kumar Pandey
    Microsoft MVP, DNS MVM


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.