I created a little web-app today that has a login screen and takes you to a new page if you enter the correct user/password combo.

It works great but I'm sort of confused as to when I should use code in ASP vs when I should put it in my .vb file.

Take for example the username. Upon a successful login I wanted a label on the next page to provide the name of the person currently logged in. I did this using the "login name" control but I imagine there is a way to do it via .NET code as well...such as creating a label and saying Label1.Text = USERNAME (or whatever the syntax happens to be...I'm not sure).

Do you see what I'm getting at? If I can do something using both methods, which is better?