This is a migrated thread and some comments may be shown as answers.

send path to database

1 Answer 49 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
HWK
Top achievements
Rank 1
HWK asked on 08 Jul 2012, 02:55 PM
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#

1 Answer, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 11 Jul 2012, 01:50 PM
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.
Tags
Upload (Obsolete)
Asked by
HWK
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or