title: Interview: how to get last clicked option at the top across all sessions for a particular user in C# asp.net?
body: <p>Suppose we have 4 options like</p>
  
  <pre><code>option1
  option2 
  option3 
  option4
  </code></pre>
  
  <p>If user clicks on <code>option4</code> the sequence should be like this:</p>
  
  <pre><code>option4 
  option1
  option2 
  option3
  </code></pre>
  
  <p>where option4 is at the top. When user clicks <code>option2</code> the sequence should be like:</p>
  
  <pre><code>option2 
  option4 
  option1
  option3
  </code></pre>
  
  <p>where option2 is at top. Like this system should maintain the option sequence for all users according to last option selected.</p>
  
  <p>Even if we insert last selected record in database how will we get the record in same sequence? Even if we order it by serial number there can be a case where user can click on <code>option4</code> 10 times which will insert <code>option4</code> 10 times in database. How do I track the last selected option when particular user logs on to system?</p>
  
  <p>How do I achieve this across every user session? When any user logs on he should get his last selected option in the system.</p>