Masterpage.aspx
Master pages should not contain form
tags in general because they are meant to be used only as the base layout of your content page. Remove the form
tag from the Master page and the error will go away.
If you want to define a common "Login" section for all your pages (this appears to be your intent), you can instead create a UserControl
to do this. You would then define a section inside your Master page to contain this user control making sure that the ContentPlaceHolder of the Login UserControl always ends up enclosed inside the content page's form
. That way, when you submit the form, the btnlogin_Click1
click event is triggered.
In conclusion: re-arrange your page in a way that you have one form
tag per page, since ASP.NET does not allow having more than one and try to define your form's inside the content pages and not the Master page.