Click here to Skip to main content
15,897,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using file uploader control in my aspx form .before final submition of form dere is some post backs ,but i want the file path for final post back of form...how can i get that one..please give ur solutions..I am searching in inter net but i did not get any proper solution for this problem.




Thank u ,

Sriram Nidamanuri
Posted
Updated 12-Aug-12 22:28pm
v2
Comments
StianSandberg 13-Aug-12 4:33am    
ok, so let's say your upload control is at page1 and your final submit is at page 2. You will have to save that file from your upload control as soon as it's posted. It's a security issue that you can't read clients file path.
So save the file in a temp directory on your webserver, give the temp file a unique name and add this uniqu name to a session variable or something so you can find the correct file when the last page is submitted.
SriramNidamanuri 13-Aug-12 5:25am    
thanks...

 
Share this answer
 
One solution is :-
Take a HiddenField Control and save the file path with HiddenField in 1st post back then you can retrieve the file path from HiddenField after many post back also.

Another solution :- You can take the help of ViewState also.
 
Share this answer
 
After Use Update Penal....

<triggers><asp:postbacktrigger controlid="ButtonName" xmlns:asp="#unknown">
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900