.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Setting File Upload Control Path

Posted By: Jayakumar     Posted Date: February 24, 2011    Points:2   Category :ASP.Net
File upload control filepath disappeared after adding new row in table.
how to again assign filepath upload control

Author: Sunil Yadav       [Moderator]      
Posted Date: February 24, 2011     Points: 5   


By default it clears file path for security reasons.

the best way would be to keep the last file uploaded path in a viewstate ,session or in a hidden field . Keep changing this value on post back so that it contains latest file path.

Let me know if you need any help.

Author: Jayakumar             
Posted Date: February 24, 2011     Points: 5   


i have set viewstate and session and hidden field again how to set fileupload control

Fup1.filename -> error comes
Fup1.Postedfile.filename -> error comes

how to set this

Name : R.Jayakumar(JK)
Email Id : kumaraspcode2009@gmail.com
Author: Sunil Yadav       [Moderator]      
Posted Date: February 24, 2011     Points: 5   


You cannot set the above mentioned properties as both of them has get accessor.
In this case you can use label control to display filepath captured from file upload.

Hope this helps.

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend