I have two pages in my root directory
1. Default.aspx (login page)
2. Home.aspx
and also one folder Attachments where i store the attachment files, from Home.aspx user can download the attachments. In order to prevent user from viewing Directory listing i add one more aspx page in this directory.
1. Root/Attachments/Default.aspx
now i want to Redirect the user to login page (Root/Default.aspx) from Root/Attachments/Default.aspx.
How this could be done.
There are a couple things you can do:
Response.Redirect("~/Default.aspx")
If you do the second option, you could then change your redirect to Response.Redirect("~/")
.