Welcome Guest Search | Active Topics | Members | Log In | Register

EntreeFileInput contor Options
aleksandarcrvc
Posted: Friday, June 17, 2011 6:54:14 AM
Rank: Advanced Member

Joined: 6/10/2011
Posts: 37
Points: 111
Location: Belgrade
Hi,

I use EntreeFileInput control and I need to save file that I am selected to file system folder. In basic asp.net control FileInput there is an method SaveAs() that allow that. Is it possible to do that with EntreeFileInput because I pass the string to my web service that reference to file system path.

Thanks,

Alex
joe
Posted: Friday, June 17, 2011 7:36:50 AM

Rank: ME Staff

Joined: 1/12/2009
Posts: 279
Points: 408
Location: VA
First, you need to be sure your clickaction has ForcePostback = true. This will make the request use a postback instead of AJAX, and will include the file that was selected.

Second, you access the posted file via the EntreeScope.FormFiles like this:

System.Web.HttpPostedFile file = EntreeScope.FormFiles[0];
file.SaveAs("yourfilename");

You will need to add a reference to System.Web in your project to be able to use the HttpPostedFile class.
aleksandarcrvc
Posted: Friday, June 17, 2011 8:21:28 AM
Rank: Advanced Member

Joined: 6/10/2011
Posts: 37
Points: 111
Location: Belgrade
Awesome!

Thanks
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

Powered by Yet Another Forum.net version 1.9.1.8 (NET v2.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.