Need to show all records AND check one record in view

Posted 3 months ago by Kemik

Hi all,

In my "" view file I am doing a foreach to show each person attending the event as a list. However, I also need to change a single button depending on if the user logged in is attending or not. The model is pulling all of the records of users attending the event (to enable the foreach). However, what is the best practice to check the user against the list? My understanding of MVC is that I shouldn't be doing that in the view itself? Do I need to do two queries and pass both to view?


Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.