Last post Apr 03, 2008 02:41 AM by mstaspnet
Mar 31, 2008 11:57 AM|mstaspnet|LINK
i am trying to retrieve media file duration brfore uploading to the server.
to upload the file m using fileupload control.
m using class file for this.
aspx file code is ashown below
and class file is as shwon below
strFileName = @fs.Name;
strFileName = strSeparator[intUpper];
lngFileSize = fs.Length;
it is displaying the error "file not found".
if i use the same code in the aspx page itself,its working fine.
if any one knows the slution please let know how to use this class file and what parameter need to pass.
Apr 02, 2008 01:52 AM|mstaspnet|LINK
getting my question or not??
Apr 02, 2008 10:08 PM|Nai-Dong Jin - MSFT|LINK
From your description, it seems that you can get the file when you assign your code in the aspx code behind page, right?
If so, I think the problem is caused by the path issue. If you are using relative path, please try to check if the aspx page and the cs file are in the same directory,
if not, you should try to change the relative path according to the directory which contains cs file.
Also, you can add a breakpoint in your application, and run it step by step, in this way , you can track what the file path you send to the cs file.
Apr 03, 2008 02:41 AM|mstaspnet|LINK
yes you are right.
thanks a lot :)