PDA

View Full Version : Prob in Document Attachment


jesha
02-26-2010, 03:39 AM
Hi,
I have some web page where we have facility to attach document.
I have written the code as below , and it was working properly earlier.

But now since past few days it stopped attaching documents.
It doesn't attach document even if its a small size like in Kb.
this same code is working perfectly on our local machine.

What I have done is like...on click on a button I am storing document in some folder like.. ~/IMS/Upload. and I am displaying that name of document on my web page in link Button.

Here is my existing code :

If lnkDownload.Text <> "" Then
If FlUpload.HasFile = True Then
lblError.Visible = True
lblError.Text = "File Upload is already holding one File,Please Select Another option"
Exit Sub
Else
filename = lnkDownload.Text
End If
Else
If Me.FlUpload.HasFile = True Then
Dim counter As Integer = 1
filename = Path.GetFileName(FlUpload.FileName)
filename = Server.MapPath("~/IMS/Upload/") + filename
FlUpload.SaveAs(filename)
filename = Server.UrlEncode(Path.GetFileName(FlUpload.FileNam e))

lnkDownload.Visible = True
lnkDownload.Text = filename
Else
filename = ""
End If
End If

Can anyone plzz tell me what's wrong & why it stop working now ? or If anyone can provide a solution for this ?


I will be very thankful.


Jesha

bruce
03-03-2010, 05:52 PM
any error?