RadUpload in Ajaxified Grid

Thread is closed for posting
2 posts, 0 answers
  1. Cécil
    Cécil avatar
    8 posts
    Member since:
    Apr 2008

    Posted 20 Nov 2008 Link to this post


    I'd like to use the example of radupload in a Ajaxified Grid (http://demos.telerik.com/aspnet/prometheus/Controls/Examples/Integration/RadUploadInAjaxifiedGrid/DefaultCS.aspx?product=upload) but saving the images in a directory, and in the database save the path of these images.
    How should I proceed?
  2. Blaize
    Blaize avatar
    88 posts
    Member since:
    Oct 2006

    Posted 20 Nov 2008 Link to this post

    Hey Cécil,

    How about:

    string filePath = Path.Combine("C:\UploadedFiles", uploadedFile.GetName());
    SqlConnection newConnection = new SqlConnection(myConnectionString);
    SqlCommand newCommand = new SqlCommand(newConnection);
    newCommand.Parameters.Add(new SqlParameter("filePath", filePath));
    newCommand.ExecuteNonReader("insert into files(filePath) values (@filePath)");

Back to Top