We have a legacy website that several different users can log in to and see a list of tasks assigned to them in a grid view. Each task is currently linked to a seperate details page using a command on a link button.
To stop users just typing task id’s into the query string and seeing other users tasks a session variable is set as part of the command each time a link is clicked.
Some users have now asked for the ability to right click the link to a task and select open new tab/window as you could with a hyperlink.
There doesnt seem to be anyway to do this using a link button or to postback and set the session variable using hyperlinks.
Are there any suggestions as to how to do this, either stopping the user seeing other tasks without the session variable or to open the link in the same tab or a new tab with postback first.
On the task details page, you can add logic to the Page_Load method to check if the user has permission to view the requested task. If he doesn’t have permission, you can redirect him elsewhere – say, to the task list page or to a “permission denied” page – using Response.Redirect.