Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET - Response redirect to different folder

I am attempting to redirect a gridview on selection. However, I am getting stuck on redirection when the page I am trying to redirect to is in a different folder.

The gridview is in a folder named HR. I am trying to redirect this to a file called Staff within a folder called Staff (Staff\Staff). How can I redirect to a different folder?

    If e.CommandName = "Select" Then
        'Add to session variable; translate the index of clicked to Primary Key
        Session.Add("DetailsKey", GridView1.DataKeys(e.CommandArgument).Value.ToString)
        Response.Redirect("staff\staff.aspx")
    End If
like image 655
user1055487 Avatar asked Dec 01 '22 07:12

user1055487


1 Answers

Response.Redirect("~/staff/staff.aspx")
like image 113
danludwig Avatar answered Dec 04 '22 02:12

danludwig