开发者

Determine path of swf file in C# application

开发者 https://www.devze.com 2023-02-28 21:58 出处:网络
I am using swf inside c# application. the problem is that, when I determine the path of swf file as static path \"c:\\path\" , the file is worked. otherwise the file doesn\'t work开发者_StackOverflow.

I am using swf inside c# application. the problem is that, when I determine the path of swf file as static path "c:\path" , the file is worked. otherwise the file doesn't work开发者_StackOverflow. I want to put the swf file inside the folder of application and run it in many devices.


if it is windows form application, you can define a working directory path as below

private static string workingDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)

by adding folder names you can access the folder you defined.

for example you can define path for swf files as below

string swfPath = workingDirectory + @"\SWFFILES"


This should give you the physical path to the virtual path of your web app. You can then append the swf filename to the end:

String path = Server.MapPath("swffolder\\");
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号