How to do Forms authentication in asp.net?
Answers were Sorted based on User's Feedback
Answer / 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 |
I have tested the above one . Its working fine.
Is This Answer Correct ? | 3 Yes | 0 No |
Can you edit data in the Repeater control?
What is the difference between table and query?
how to get modified rows from Dataset
What is boxing and unboxing ?
7 Answers Accenture, Infosys, MedTek,
What are type/key pairs in client script registration?
Where do we store our connection string in asp.net application?
Which method is used to force all the validation controls to run?
On what object is the transaction in ADO.NET focused on? a) The command object b) The DataSet object c) The Connection object d) The DataAdapter object
how can u create the forms authentication?and what is the difference between forms authentication and windows authentication?
• What Session State providers are available in ASP.NET? What are the pros and cons of each?
Is session server side or client side?
Why does a user need nothing more than a Web browser to view ASP.NET pages?