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
if page.ispostBack ()=true then
end page_load///// i donot know vb well
3. modify your property as
Private ReadOnly Property returnUsername() As String
If blnIsPostBack = True Then
returnUsername = ToString(usernametxt.Text)Return returnUsername
returnUsername = ""Return returnUsername
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.:)