c# - Preserve user folder location on browse for image? -


i using ajax file upload, , trying make when user browses image, next time go browse image end in same folder. in other words, if pick image foldera, next time go pick image start in foldera. not sure if implement on server side or on client side, or both.

<div class="upload-photos-add" id="q0012_00" runat="server">     <asp:ajaxfileupload enableviewstate="false" id="ajaxfileupload2" contextkeys="0012.00" runat="server" allowedfiletypes="jpg,jpeg,png" onuploadcomplete="ajaxfileupload_uploadcomplete" onclientuploadcomplete="onclientuploadcomplete" onclientuploadcompleteall="onclientuploadcompleteall" onclientuploadstart="onclientuploadstart"></asp:ajaxfileupload> </div> 

i think should set default path in web.config below:

<appsettings>     <add key="uploadpath" value="../uploadfiles/"/> </appsettings> 

and each time select new path try update value attribute in below:

configuration config = webconfigurationmanager.openwebconfiguration("/"); string oldvalue = config.appsettings.settings["value"].value; config.appsettings.settings["value"].value = "new path"; config.save(configurationsavemode.modified); 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -