Visual Studio .NET - How to retain Viewstate value for a Fileupload control

Asked By santhosh kumar on 21-Mar-07 11:54 PM
I am using FileUpload control in ASP.NET 2.0 ,I am having soome server side validation like whether the Filename already exists in the Folder.When this condition goes wrong and returning to the page my TextBox Text in FileUpload control Gets Clearer,I made EnableViewstate property true ,Buy no use,Is tere any other Way?????

u cant maintain that for fileupload control, but u can do one thing - K Pravin Kumar Reddy replied to santhosh kumar on 22-Mar-07 01:38 AM

u cant maintain that for fileupload control, but u can do one thing. when user selects file to upload just save/show that file path using lable during postback lable will maintain data,

if u need any more help reply back 

Thanks How to get the Full path in codebehind - santhosh kumar replied to K Pravin Kumar Reddy on 22-Mar-07 03:51 AM

end of post

you mean like this? - Burak Gunay replied to santhosh kumar on 22-Mar-07 08:02 AM

Dim file As String = String.Empty

file = Server.MapPath("courses.xml")

this will return you the fullpath of a file on your server