I'm trying to login by storing username and password in web.config file as below
<authentication mode="Forms">
<forms loginUrl="Admin Login.aspx" defaultUrl="~/Home.aspx">
<credentials>
<user name="Admin" password="123" />
</credentials>
</forms>
</authentication>
And I wrote this code on submit button
if (FormsAuthentication.Authenticate(TxtUsername.Text, TxtPassword.Text))
{
Response.Redirect(FormsAuthentication.GetRedirectUrl(TxtUsername.Text, false));
}
but it's not get redirected.. Any suggestion..?