fileUpload control of asp
-
i m using mozilla fire fox n looking for a full path of posted file from fileUpload control of asp string filepath= fileUpload1.PostedFile.FileName; but filepath only holds the file name.. no path............... helpp plzzzzzzzzzz
AhmedNisar82 wrote:
fileUpload control of asp
I guess you are talking about ASP.NET not ASP.
AhmedNisar82 wrote:
string filepath= fileUpload1.PostedFile.FileName;
You will only get the file name. Use it to upload the file.
FileUpload1.PostedFile.SaveAs(filpathToSave)
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article
-
i m using mozilla fire fox n looking for a full path of posted file from fileUpload control of asp string filepath= fileUpload1.PostedFile.FileName; but filepath only holds the file name.. no path............... helpp plzzzzzzzzzz
Why would you need a file path ?
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
AhmedNisar82 wrote:
fileUpload control of asp
I guess you are talking about ASP.NET not ASP.
AhmedNisar82 wrote:
string filepath= fileUpload1.PostedFile.FileName;
You will only get the file name. Use it to upload the file.
FileUpload1.PostedFile.SaveAs(filpathToSave)
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article
Yet another person who asks stupid questions, then does not reply when people try to help. I suspect he wants the full path because he wants to do some sort of file operation that won't work once he deploys to a server.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
Why would you need a file path ?
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
i want to assign a value oMediaManagerPro.SourceFile_Path =fuplVideo.PostedFile.FileName; oMediaManagerPro.Video_Bitrate = 300; oMediaManagerPro.Audio_Bitrate = 64; oMediaManagerPro.Audio_SamplingRate = 22050; MediaInfo oMediaInfo = oMediaManagerPro.ConvertTo_MP4(); but fuplVideo.PostedFile.FileName just give the name of the file not full path.....
-
i want to assign a value oMediaManagerPro.SourceFile_Path =fuplVideo.PostedFile.FileName; oMediaManagerPro.Video_Bitrate = 300; oMediaManagerPro.Audio_Bitrate = 64; oMediaManagerPro.Audio_SamplingRate = 22050; MediaInfo oMediaInfo = oMediaManagerPro.ConvertTo_MP4(); but fuplVideo.PostedFile.FileName just give the name of the file not full path.....
What is oMediaManagerPro ? As I suspected, it looks like you have an object on the server and want to set it to use a path on the client, which obviously won't work. I suggest buying a basic ASP.NET book and reading it.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
i m using mozilla fire fox n looking for a full path of posted file from fileUpload control of asp string filepath= fileUpload1.PostedFile.FileName; but filepath only holds the file name.. no path............... helpp plzzzzzzzzzz
HttpPostedFile myfile = filMyFile.PostedFile; int fileLen = myfile.ContentLength; byte\[\] myData = new byte\[fileLen\]; myfile.InputStream.Read(myData, 0, fileLen); String strFilename=Path.GetFileName(myfile.FileName);
============= NITIN SAWANT =============
-
HttpPostedFile myfile = filMyFile.PostedFile; int fileLen = myfile.ContentLength; byte\[\] myData = new byte\[fileLen\]; myfile.InputStream.Read(myData, 0, fileLen); String strFilename=Path.GetFileName(myfile.FileName);
============= NITIN SAWANT =============
I have read this three times, and I still don't see how you think it answers the OPs question
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
Yet another person who asks stupid questions, then does not reply when people try to help. I suspect he wants the full path because he wants to do some sort of file operation that won't work once he deploys to a server.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
Christian Graus wrote:
Yet another person who asks stupid questions, then does not reply when people try to help.
Boss, I did not understand what you mean by this. By the way, I didn't voted for this. [Edit]Now I have voted 5.[/Edit] Thanks
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article
modified on Wednesday, August 5, 2009 5:41 AM
-
Christian Graus wrote:
Yet another person who asks stupid questions, then does not reply when people try to help.
Boss, I did not understand what you mean by this. By the way, I didn't voted for this. [Edit]Now I have voted 5.[/Edit] Thanks
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article
modified on Wednesday, August 5, 2009 5:41 AM
I mean that his question is obviously asked because he assumes because he can write code on a dev machine that accesses the file by file path, it means that he can magically do the same thing on the server when he deploys. His post asking for more info pretty much proves that. And, so many people ask questions that basically show they know nothing about ASP.NET, then don't respond when people try to help ( this guy did eventually respond, but many do not ).
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
I mean that his question is obviously asked because he assumes because he can write code on a dev machine that accesses the file by file path, it means that he can magically do the same thing on the server when he deploys. His post asking for more info pretty much proves that. And, so many people ask questions that basically show they know nothing about ASP.NET, then don't respond when people try to help ( this guy did eventually respond, but many do not ).
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
Ya.. Got it Boss. You are absolutely correct!:thumbsup:
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article