I should know how to do this one, but I’m at the point where I think it would be more efficient to just ask.
I have a select field in the _Layout.cshtml in an MVC3 project. When the user selects a new value from the field, I want to store their selection in a session variable and then refresh the page with changes based on that session variable (much like a postback in the forms model). What would be the best way to do this.
Thanks.
You need to send the data to your server if you need to store it in a session variable. A ajax call would be your best bet here. When you get a response back from server, redirect to the same page. Something like this: