title: Knockout set Dropdown value
body: <p>I  have a language dropdown in layout.chtml using knockout js  </p>
  
  <pre><code> &lt;select id="Language" class="styled-select" data-bind="value: Language,options: locale, value: selectedLocale, optionsText: 'name'"&gt;&lt;/select&gt;
  
  
   var viewModel = this;
  
   viewModel.locale = [{ id: 1, name: 'English' }, { id: 2, name: 'Spanish' }];
  
   viewModel.selectedLocale = ko.observable(sessionStorage.culture);
   viewModel.selectedLocaleValue = ko.computed(function () {
       sessionStorage.culture = viewModel.selectedLocale() &amp;&amp; viewModel.selectedLocale().id;
  });
  
  ko.applyBindings(viewModel);
  </code></pre>
  
  <p>While run the application I have change the dropdown and choose the spanish then When i click the submit button the page got re-rendered and again re sets the culture session value with the default English.</p>
  
  <p>The following are the possible ways to fix the issue.</p>
  
  <ol>
  <li>While re-rendering do some tweaking and set the dropdown selected value and should reflect in the culture session</li>
  <li>Avoid re-rendering while post action from Login</li>
  <li>Have Ajax call for post.</li>
  </ol>
  
  <p>I have tried option 1 But I dont know how to set the selected value in dropdown</p>