设置asp超链接控件的navigerurl属性 [英] setting navigateurl property of asp hyperlink control

查看:146
本文介绍了设置asp超链接控件的navigerurl属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用VB .NET动态生成excel工作簿并将其保存在特定位置.我必须检查是否存在具有相同名称的文件.如果存在,我必须删除该文件,然后保存新生成的文件.

是否可以将NavigateUrl属性设置为位于"C:\ MyFolder \ MyFile.xls"的文件?

如果我将此属性设置为项目文件夹(C:\ Documents and Settings \ user_name \ My Documents \ Visual Studio 2010 \ Projects \ MyProject \ MyProject \ MyFile.xls)我无法下载文件.

我想使用System.IO.Delete()方法.如果无法将超链接的navigationurl属性设置到其他位置,是否可以授予删除位于项目文件夹中的文件的权限?

请帮帮我.

预先感谢,
Vanathi

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

推荐答案

我想使用System.IO.Delete()方法.如果无法将超链接的navigationurl属性设置到其他位置,是否可以授予删除项目文件夹中文件的权限
希望您理解为什么会这样.您仅为项目文件夹而不是整个系统配置了适当的访问权限.

如果要使用任何其他位置,则需要确保对该文件夹具有适当的安全权限.

关于授予删除权限的可能性-在应用程序运行时,它以特定帐户运行. IIS或您设置的模拟凭据.您无法在应用程序内设置权限.
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.


这篇关于设置asp超链接控件的navigerurl属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆