i used this code to upload the images from the local path. but when i'm trying to upload the images in the webpage it is not showing. can any one can tell what's wrong in the coding. it will be very helpful.........................
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
ImageMap1.AlternateText = ""
If FileUpload1.HasFile Then
Try
If (FileUpload1.PostedFile.FileName.EndsWith(".jpg")) Then
FileUpload1.SaveAs("C\Documents and Settings" & _FileUpload1.FileName)
ImageMap1.AlternateText = "uploaded sucessfully....." & "<br>" & "File name: " & _
FileUpload1.PostedFile.FileName & "<br>" & _
"File Size: " & _
FileUpload1.PostedFile.ContentLength & " kb<br>" '&
Else
ImageMap1.AlternateText = "Not a valid file."
End If
Catch ex As Exception
ImageMap1.AlternateText = "ERROR: " & ex.Message.ToString()
End Try
Else
ImageMap1.AlternateText = "You have not specified a file."
End If
End Sub
please help me... need it very urgently.
thanks a lot