I think you cannot use page.ispostback() from the property(i think/not sure) . modify you code by the following instruction.
1. declare a public Boolean variable into the beging of your class name blnIsPostBack.
2. in the page_load event write the following code
page_load()
blnIsPostBack=false
if page.ispostBack ()=true then
blnIsPostBack=true
end if
end page_load///// i donot know vb well
3. modify your property as
Private ReadOnly Property returnUsername() As String
Get
If blnIsPostBack = True Then
returnUsername = ToString(usernametxt.Text)
Return returnUsername
Else
returnUsername = ""
Return returnUsername
End If
End Get
End Property
I think it will work for you.I am weak in vb code. for further query ask me.
Shafiul hasan md. tareq
plz marked as answer if it helps you for future developers who are facing same problem.:)