Hi
I m facing a strange issue with filename
I am attaching an attachment (may be a notepad file, video file or whatever)
through a dummy customer page (customer.html) using a text box on this page.
I am getting the problem that my code is taking the entire path as file name
instead of that only name of attachment file name e.g. it should take only
attachment file name.
Dim file_coll As HttpFileCollect ion
Dim en_file_coll As IEnumerator
Dim postedfile As HttpPostedFile
file_coll = Request.Files
en_file_coll = file_coll.GetEn umerator
Do While en_file_coll.Mo veNext
postedfile = file_coll.Item( i)
If postedfile.File Name.Length 64 Then
Throw New local_exception ("Filename too long " & postedfile.File Name)
Exit Do
End If
This postedfile.File Name is coming as “C:\Documents and
Settings\wfmadm in\Desktop\test AttachmentFiles \att3.txt" instead of att3.txt
Is there any way to handle it? The file can be of any type (means *.text
file or *.pdf file or whatever and also it can be attached from any folder,
any location etc.)
Kindly help me
Thanks,
Deepak
+919886735837
kr**********@ho tmail.com