i have this code
<select name="item.location" class="selectpicker">
@foreach (var x in JournalConnector.GetAllLocations())
{
<option id="line" value="@x">@x</option>
}
</select>
which gets the locations that are in the database.
after i post my form i want it to remember the selected option and start the page on it again.
the rest of the code on the page is here: JsFiddle
i have tried using localstorage and session storage, but neither saves the value i need to save (which would be @x)