Posted on: 6/23/2012 8:19:30 PM | Views : 276

I'm relatively new to ASP and I'm trying to do something that might be trivial but I've been unable with my knowledges and some research.
I'm developing a web application that requires users to be authenticated to access some pages while some other are public and that works flawless configuring the locations on the Web.config. But at one point I require the users to be authenticated to perform an action fired by an OnClick event from a page that is, otherwise, publicly accessed.
At this point I've managed to request the authentication by coding this:
if (SessionManager.IsUserAuthenticated(Context)) // SessionManager is a custom class that manages session info { // Action code } else { Response.Redirect(Response.ApplyAppPathModifier("~/User/Authentication.aspx?ReturnUrl=" + HttpUtility.UrlEncode(Request.Url.AbsolutePath))); }
but the user is required to repeat the action, and I'd like to have it performed if ...

Go to the complete details ...