I’m trying to develop a very simple messaging form (MVC C# forms), in which a form displays how many unread messages a user has. If a new message was to come into the list in my model, how do you notify the view (which methods)? I can’t seem to get my head round this.
Share
If you are talking about a C# windows forms application then what you want to use is the Observer pattern. See here for the pattern. Basically you want to have your controller register with the model via the observer pattern to be notified of any model changes that can cause the view to be obsolete. Then the controller can notify the view to re render the affected portion.