Yes, this is a seperate class file. Basically, you can put your server-side code (code runs on the server) on a single web page, or seperate them in the code-behind with using the Codebehind attribute of the Page directive. Because you refer to the form control in the button Click handler that is in the code-behind, so we put that declaration inside the code-behind class as well, for example:
Public Class ForgotPassword Inherits System.Web.UI.Page
#Region " Web Form Designer Generated Code "
...
#End Region
Protected WithEvents frmpassword As System.Web.UI.HtmlControls.HtmlForm
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
End Sub
...
End Class
If you develop your asp.net application in VisualStudio, you are recommended to use the code-behind model as it makes your code much clearer and you can seperate layout from code. For more information, see Web Forms Code Model[^]