Showing posts with label C# Security. Show all posts
Showing posts with label C# Security. Show all posts

Monday 21 August 2023

CaptchaMvc Mvc5 | C# ASP.Net

 CaptchaMvc Mvc5 Using C# ASP.Net Visual Studio 2019



CAPTCHA stands for "Completely Automated Public Turing test to tell Computers and Humans Apart". It is a test used to distinguish between humans and computers. CAPTCHAs are often used to prevent automated spam and abuse.

Thursday 15 December 2022

FormsAuthentication C# ASP.NET MVC

 


FormsAuthentication

FormsAuthentication class from System.Web.Security is used to authenticate a user whether login or not. FormsAuthentication class has many functions to check the user login and it's very easy to implement. Follow the code given below

Views

<h2>Login</h2>

<form method="post">

    <input type="text" name="UserName" placeholder="User Name"  required /><br /><br />

    <input type="password" name="Password" placeholder="Password" required /><br /><br />

    <input type="submit" value="Login" />

    @if (Request.QueryString["msg"] != null)

    {

        <br /><br />

        <span style="color:red">@Request.QueryString["msg"]</span>

    }

</form>