Hi,
I am developing a very basic application in C# and Asp.Net using New Website-->Asp.Net web site.This is a simple login control application available in Visual Studio.
After starting a project, I found folder structure like that
Project name "WebSite2" under which I have folders like "Account", "Scripts" and "Styles" and few files like "About.aspx", "Default.aspx" and "Web.config" under the same "WebSite2" folder. Under "Account" folder I have files like "ChangePassword.aspx","ChangePasswordSuccess.aspx","Login.aspx","Register.aspx" and "Web.config". Now I have add a simple page "ThankYou.aspx" under "Account" folder and "Thanks" under "WebSite2" folder. I have modified "Register.aspx.cs" file so that whenever a new user will register, an email will be sent to the persons inbox and from where he will activate his account and this functionality is working fine.
Now the problem is that whenever a new user registered, an email will be send to him and simultaneously he will be landed to "ThankYou.aspx" page, but here the user is redirecting to "Login.aspx" page.
This URL appears http://localhost:4201/WebSite2/Account/Login.aspx?ReturnUrl=%2fWebSite2%2fAccount%2fThankYou.aspx
I have tried it with so many combinations but always getting "Login.aspx" page. I have tried generating the path like Response.Redirect("~/Account/ThankYou.aspx"); and Response.Redirect("~/ThankYou.aspx");I have tried it with other combinations also but instead of redirecting to "ThankYou.aspx" page, it is redirecting to "Login.aspx" page.
But whe I use Response.Redirect("~/Thanks.aspx"); it is working fine.
Can you please help me in that?
Thanks in advance.
Regards,
Jatin