So for this first we will create a new asp.net application and add the below code into the page.
<asp:TextBox ID="txtPassword" runat="server" TextMode="Password" required minlength="6"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Submit" />
In above code please check the bold and highlighted part of the code. In this I have added required and minlength. In this required will force user to enter some value and minlength force user to insert min 6 character. Without this user will not be able to submit the form.