Help get this topic noticed by sharing it on Twitter, Facebook, or email.

User Avtar

Hi,

I follow the below link to change user avtar.

https://www.youtube.com/watch?v=fgWeF...

Below is the ApplicationServices.Overrides.vb

Imports Microsoft.VisualBasic
Imports System.IO
Imports FreeTrial.Data
Imports System.Drawing
Namespace FreeTrial.Security
Partial Public Class ApplicationServices
Public Overrides Function UserPictureImage(user As MembershipUser) As Image

Using sql = New SqlText("Select Picture from UserPictures Where UserName=@UserName")
sql.AssignParameter("@UserName", user.UserName)
If sql.Read() Then
Dim Value = CType(sql("Picture"), Byte())
If Value IsNot Nothing Then
Return Image.FromStream(New MemoryStream)

End If
End If
End Using
Return UserPictureImage(user)
End Function
End Class
End Namespace

I got the error.

Compiler Error Message: BC30284: function 'UserPictureImage' cannot be declared 'Overrides' because it does not override a function in a base class.

Source Error:

Line 5:
Line 6: Partial Public Class ApplicationServices
Line 7: Public Overrides Function UserPictureImage(user As MembershipUser) As Image
Line 8:
Line 9: Using sql = New SqlText("Select Picture from UserPictures Where UserName=@UserName")

Attached is the image.

Thanks
Basit.

1 person has
this question
+1
Reply