Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to do Forms authentication in asp.net?

Answer Posted / sivasaravanan

in webconfig file

<authentication mode="Forms">
<forms cookieless="UseCookies"
loginUrl="~/LoginInformation.aspx" timeout="10">
<credentials passwordFormat="Clear">
<user name="Siva" password="siva"/>
<user name="joseph" password="jos"/>
</credentials>
</forms>
</authentication>

After In a aspx.cs page you have write a below coding

if (FormsAuthentication.Authenticate(TextBox1.Text,
TextBox2.Text))
{
Response.Write("Hi Joseph");
}
else
{
Response.Write("Please Create account");
}

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the displayafter property in updateprogress control?

928


Explain the advantages of caching?

938


Why viewstate is used in asp.net?

973


What is Web API Routing?

1094


How many validators do ASP.NET have?

1051


How can I create master page in asp net?

899


What are session cookies?

957


Why do we use web config?

886


How to deploy/publish webservices?How many ways?Plz explain me

2230


what are the ihttphandler and ihttphandlerfactory interfaces ?

902


Explain managed code an un-managed code.

973


Explain code snippet to register exception filters from controller?

974


Can we add code files of different languages in app_code folder?

1041


What is the difference between page-level caching and fragment caching?

929


How does ASP.NET framework maps client side events to Server side events.?

1028