I have an Admin page with an input textbox with ID of "TxtBxTypeUserName", that brings up User profile information for the username that is typed into the box.
Works fine when I type in an existing Username, but understandably fails when I type in a Username that does not exist, and I can't seem to get the exception handling set up correctly. What I want to happen when a non-existing username is typed into the textbox is to set an error message in a Label with ID of LblException, and for the page to stay right there so I can type in a good username.
What actually happens with the following code is a yellow exception page of death comes up stating "Object reference not set to an instance of an object"
The code I am trying is below, I would surely appreciate learning how it should be changed:
Protected Sub TxtBxTypeUserName_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TxtBxTypeUserName.TextChange ...
Go to the complete details ...