I am working in ASP.NET MVC3. When a user complete registration, I want to notify user to change personal information only in first lo-gin. How can I do it?
相关问题
- Entity Framework throws exception - Network Relate
- Slow loading first page - ASP.NET MVC
- Remove keyboard notification when ViewController d
- How can I add condition on mail notification larav
- Android: Unclicked notification timeout
相关文章
- “Dynamic operations can only be performed in homog
- Change color of bars depending on value in Highcha
- How to get server path of physical path ?
- How to find the exceptions / errors when TryUpdate
- ASP.Net MVC 3: optgroup support in Html.DropDownLi
- Android remove notification(created by mNotifyBuil
- A circular reference was detected while serializin
- AccessViolationException was unhandled
If a user completes your registration process you need to store a value which indicates that he has not yet changed his personal information yet.
Something like
You can always create a new variable to check if this is the user's first login, but that variable would become unused after the first login.
I assume you have a DateTime variable for UserLastLoggedin or something along those lines? If that is null, then the user is logging in for the first time.
There are several ways to accomplish that. You can utilize Profiles, or create a table in your database where you can store userId along with an indicator if he's logging in for the first time or not.
Let's say you want to use profiles : add this to you web.config
If you're using default AccountController take a look at this code :