Hi,
I am new to kentico .
I made new Module with vb.net I am trying to upload image to the lib and show preview of it before send the email.
i can not get it to upload the image. so if anyone know easy way to upload it. or how can i add web part to mycode to let me upload it to the media lib.
Thanks
my code is like that
Dim CouponfileName As String = ""
Dim savePath As String = "~/AMR/media/AMR/"
'Dim savePath As String = "\\djjgxfs\AlmanacDocuments\publicfiles\"
If (fileImage.HasFile) Then
Dim imagename As String = Server.HtmlEncode(fileImage.FileName)
savePath += fileImage.FileName
CouponfileName = fileImage.FileName
fileImage.SaveAs(savePath)
lblStatus.Text = "Your file was uploaded successfully"
Else
lblStatus.Text = "NO IMG"
End If