Var myPic As Picture
Var myFile As FolderItem
Var d As WebFileUploader
d = New WebFileUploader
myFile = d.ShowModal
If myFile <> Nil Then
myPic = Picture.Open(myFile)
If myPic <> Nil Then
Canvas1.BackDrop = myPic
End If
End If
ERRORS ARE:
The “WebFileUploader” has no member named “ShowModal”
The “WebCanvas” has no member named “BackDrop”
WebFileUploader have to be a control dropped into the Window/Page
and then a user can choose a file and upload it.
It Upload a file which temporary exists in this UploadFinished Method/Event.
Thanks @MarkusR
I still don’t know how to create list in ListBox for students with name, email and picture.
Main problem for me is to add pictures to the students.
This is the code:
Var row As DatabaseRow
Var picFile As FolderItem = SpecialFolder.Desktop.Child(“images”).Child(“MyPicture.png”)
row = New DatabaseRow
row.Column(“name”) = NameField.Text
row.Column(“email”) = EmailField.Text
row.Column(“picture”) = FileUploader1.StartUpload.picFile
Try
MyDatabase.AddRow(“addressbook”, row)
Catch error As DatabaseException
MessageBox(error.Message)
End Try
It works without uploading page, only for Name and Email.