Link to home
Start Free TrialLog in
Avatar of aatif84
aatif84

asked on

Where is a good place to store functions like Logout() that all my pages can access?

Where is a good place to store functions like Logout() that all my pages can access?


For example, if I have a method that does this:

Protected Sub Logout_Click(ByVal sender As Object, ByVal e As EventArgs)
        FormsAuthentication.SignOut()
        Response.Redirect("~/Default.aspx")
End Sub

Where can I put that so that all my pages can get access to that function without having to rewrite it in all my pages?


Thanks!

ASKER CERTIFIED SOLUTION
Avatar of amanola
amanola
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of aatif84
aatif84

ASKER

I am using VB but I don't know how to access that class from my aspx page. Any code examples?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of aatif84

ASKER

Thanks!