开发者

How to force user to submit a form before allowing them access to the rest of the site?

开发者 https://www.devze.com 2023-04-02 16:34 出处:网络
What I have to accomplish is to collect some information from the users of the web system before letting them doing anything else on the site. These users are already registered and have roles assigne

What I have to accomplish is to collect some information from the users of the web system before letting them doing anything else on the site. These users are already registered and have roles assigned in asp membership/roles providers. I am able to redirect them to the form that I need them to submit right after they authenticate, however that wouldn't prevent them to navigate to other parts of the system without filling it out. My only thought so far is to in开发者_JS百科sert a check if the user has filled the form in every action of the system and if they didn't - I would redirect them to the form, but that seems like a really horrible idea. What would be the best way implement that functionality for an asp.net mvc2 web app?


Have an Intercepting Filter on the web site that checks on every request to make sure the data is filled out. If it isn't then redirect them to the form.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号