Change the folder with parameter

  •  03-15-2013, 11:51 AM

    Change the folder with parameter

    Hello,

    I am trying to use your framework and I need to understand how is it possible to change the destination folder using the value of a field of my webpage. 

     

    In the method UploadHandler.ashx/OnFileUploaded, I achieved to save my images in an existing folder :

     

    file.CopyTo("~/Documents/" + file.FileName);

     

    but I want to do:

     

    file.CopyTo("~/Documents/" + valueOfMyField + "/" + file.FileName);

     

    I could overload the method with a string parameter which will represents my value or change the FileName but I don't know where I can change the call of the method (and if it's possible) or modify the FileName attribute.

     

    I've already taken a look to documentation or other posts in the forum, and I didn't find something close to my problem.

    Waiting for a reply, I thank you in advance for your attention.

     

     

    Filed under: , ,
View Complete Thread