Create Upload Folder Based Upon User

Thread is closed for posting
4 posts, 0 answers
  1. Michael
    Michael avatar
    3 posts
    Member since:
    Sep 2008

    Posted 09 Sep 2008 Link to this post

    I have a Create New User Wizard.  Step 3 of the wizard I am using Rad Upload.  I have a folder on the server called "upload".  When the user clicks the sumbit button of the Rad Upload  I  need a  a folder  to be created based uopn the  users "UserId" and the files will upload into the newly created folder in the upload folder on the server.  I am unsure how to code the page to perform this action.
    I am using VB.
  2. Matthew Bishop
    Matthew Bishop avatar
    58 posts
    Member since:
    Apr 2007

    Posted 16 Sep 2008 Link to this post

    This would be it in c# mate, i assume its simular in vb, but if I tried to do it in vb i'd get it all wrong :/

    string user=Request.Form["UserId"].ToString();
    string path="./upload"+user;
    if (!Directory.Exists(Server.MapPath(path) ))
    {
    Directory.CreateDirectory(Server.MapPath(path);
    }

    Radupload1.TargetFolder=path;

  3. Michael
    Michael avatar
    3 posts
    Member since:
    Sep 2008

    Posted 23 Sep 2008 Link to this post

    Thanks for the message that was very helpful.  I am new to this and need assistance in writing this code in VB if anybody can help.
    Thanks
  4. Steve Kaser
    Steve Kaser avatar
    10 posts
    Member since:
    Jul 2005

    Posted 18 Oct 2008 Link to this post

    Michael

    The site below is a great place to convert c# to VB or VB to c#

    http://labs.developerfusion.co.uk/convert/csharp-to-vb.aspx


    Good luck

    Steve
Back to Top