Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / June 2007

Tip: Looking for answers? Try searching our database.

FileUpload  PostedFile  after Postback question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ronc85@gmail.com - 05 Jun 2007 04:22 GMT
My environment is ASP.NET 2.0, C# and AJAX.

Is there a way to retain the Postedfile in the FileUpload control
after Postback? I have this application I've inherited were the User
chooses a file then clicks the "save" button, the program proceeds to
edit the file on the server and if it detects an error displays an
error message. At this point the filename is lost from the FileUpload
input field.

Sal P.
Siva M - 05 Jun 2007 10:07 GMT
It is 'by design', for security reasons. The idea is that users should know
and explicitly select a file for upload. Hence cannot be retained across
postbacks.

> My environment is ASP.NET 2.0, C# and AJAX.
>
[quoted text clipped - 6 lines]
>
> Sal P.
GenCode - 19 Jun 2007 17:43 GMT
Actually the FileUpload retains its state just fine after
postback...it only gets null'ed when dropped into an AJAX panel, when
the panel is removed it retains its state again even after
postback...so I have doubts that it is a question of security.

> It is 'by design', for security reasons. The idea is that users should know
> and explicitly select a file for upload. Hence cannot be retained across
[quoted text clipped - 13 lines]
>
> - Show quoted text -

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.