I want my anonymous user to be able to navigate throughout the website, but if he presses any button inside the site, he should be redirected to a login page. How do I achieve this?
Are there functions that I should use in the FormAuthentication class?
You can set authentication in files by some setting in in web.config like.
this will allow you to navigate all the pages.
Now for any event in page like button click or something else you can write a function in which you can check authentication and authorization of user by Membership provider
like