send path to database

2 posts, 0 answers
  1. HWK
    HWK avatar
    1 posts
    Member since:
    Jul 2012

    Posted 08 Jul 2012 Link to this post

    hi everyone

    by using RadUpload inside RadGrid  how can i send path to database and  store file in an folder ..... i tested some of the code but i didn't succeed

    i am using C#

  2. Bozhidar
    Admin
    Bozhidar avatar
    755 posts
    Member since:
    Sep 2012

    Posted 11 Jul 2012 Link to this post

    Hi,

    I would suggest that you use RadAsyncUpload and the following demo as a reference:
    http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandradasyncupload/defaultcs.aspx?product=upload 

    In the demo the file itself is saved to the database, but you can easily change the logic so that it is saved to a folder with the following code:

    UploadedFile file = radAsyncUpload.UploadedFiles[0];
    string path = Server.MapPath("Files");
    string fullPath = Path.Combine(path, file.FileName);
    file.SaveAs(fullPath);

     
    Greetings,
    Bozhidar
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.

  3. DevCraft Release
Back to Top