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
What are the authentication types in asp.net?
Explain the concept of event bubbling in ASP.NET?
How do you use viewstate?
Explain the difference between response.redirect vs server.transfer
What is difference between View State and Hidden Field in ASP.NET?
What are themes and skins in 2.0, explain usage scenario?
What tags do you need to add within the asp:datagrid tags to bind columns manually? How?
How do you do client-side validation in .net? How to disable validator control by client side javascript?
Why do we need asp.net?
What is asp.net introduction?
What is a uri query?
How can we Validate a Controls in ASP.NET page using JavaScript?
Explain the difference between asp and asp.net?
What is session management in web application?
How do you initiate validation on the server manually? What are two situations when you might you want to do that?