Create a Simple Login Form in ASP.NET

Step 1:

Create a New Project and go to the Visual C# -->Web-->ASP.NET Web Application and name your application whatever you want.



Step 2:

After pressing the OK button a new window comes out and asks you to select Application Template. As you are a beginner you have to select an Empty Template and click OK.

After this your project is created successfully and solution explorer contains all the files related to your project.



Step 3:

Now you have to add a WebForm and Html page in your project by going into your project right click Add-->New Item-->Web-->HtmlPage and click OK .Similarly you can add WebForm by going into your project right click Add-->New Item-->Web-->WebForm and name it default.aspx and click OK.


web form

web form

Step 4:

Now go to the ToolBox and drag TextBox and Buttons and drop in to your default.aspx page. Add labels or placeholder -- whatever you want. Similarly add the button and go to the property window and change the Text property of a button from Button to Login.




Step 5:

Now debug your project by pressing F5.You can also choose different web browsers for debugging mode. I recommend Microsoft Edge.


Step 6:

After debugging your browser opens and displays your login page. You can also add css design depending on your requirements.