Click here to Skip to main content
15,920,217 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I'm using VB .NET to dynamically generate an excel workbook and to save it in a particular location. I have to check whether a file with the same name exists. If it exists I've to delete the file and then save the newly generated file.

Is it possible to set the NavigateUrl property to a file located at "C:\MyFolder\MyFile.xls"?

If I set this property to a location other than the project folder(C:\Documents and Settings\user_name\My Documents\Visual Studio 2010\Projects\MyProject\MyProject\MyFile.xls) I'm unable to download the file.

I wanna use the System.IO.Delete() method. If it is not possible to set navigateurl property of the hyperlink to a different location, Is it possible to give permissions to delete a file located at the project folder?

Please help me.

Thanks in advance,
Vanathi
Posted

1 solution

I wanna use the System.IO.Delete() method. If it is not possible to set navigateurl property of the hyperlink to a different location, Is it possible to give permissions to delete a file located at the project folder
Hope you understand that why is it so. You only have proper access permissions configured for the project folder and not entire system.

If you want to use any other location, then you need to make sure that you have proper security permissions for that folder.

About possiblility to give delete permission - while application is running it is run under certain account. Either IIS or the impersonation crendentials that you have set. You cannot set the permissions from within the application.
 
Share this answer
 
Comments
Sandesh M Patil 13-Dec-10 7:40am    
good 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