The following article describes how to create a simple user Log-in User Interface for the C# windows application.
1. Start a new Project in c#.
You can develop a C# application without using Visual Studio. For this, you have to write the whole code by yourself and then compiling it by the C# compiler(csc.exe). For a basic console application, you have to write only one single file, which is Program.cs, which contains the main() method in it. This walkthrough guides you through creating a simple ASP.NET Web Forms page and illustrates the basic techniques of creating a new page, adding controls, and writing code. Note; This topic applies only to ASP.NET Web Forms pages. It does not apply to pages that you create using ASP.NET MVC. Select Web Form. In the Name box. In many ASP.NET Web Form pages, you write code in Visual Basic, C#, or another language. The code editor in Visual Studio can help you write code quickly while helping you avoid errors. In addition, the editor provides ways for you to create reusable code to help reduce the amount of work you need to do.
2. Add a new windows form in your project with name login.cs.
3. Re size the Login form and add two textbox named txtUserName and txtPassword,two label controls and one button control named btnOk.
4. set the PasswordChar property to astrick(*) of the txtPassword textbox.
5. Write the function for validating the both textboxs:
6. Verify he correct user name and password from the SQL database: