Retrieve selected item from session

BaBY-DruStR

New Member
I am working in ASP.NET MVC. I have the following \[code\]<select>\[/code\] tag \[code\]<select id="selectQualification" tabindex="4" > <option value="http://stackoverflow.com/questions/15877009/Select Qualification">Select Qualification</option> <option value="http://stackoverflow.com/questions/15877009/Intermediate">Inter</option> <option value="http://stackoverflow.com/questions/15877009/Bachelor">Bachelor</option> <option value="http://stackoverflow.com/questions/15877009/Graduate">Graduate</option> <option value="http://stackoverflow.com/questions/15877009/Master">Master</option> <option value="http://stackoverflow.com/questions/15877009/PostGraduate">Post Graduate</option> <option value="http://stackoverflow.com/questions/15877009/M.Phile">M.Phil</option> <option value="http://stackoverflow.com/questions/15877009/Ph.D">Ph.D</option> <option value="http://stackoverflow.com/questions/15877009/Other">Other</option> </select>\[/code\]I store the selected item in the session in my controller code. What I want is that if I select an item in the \[code\]<select>\[/code\] tag and then start visiting other pages, that when I return to the initial page(with the \[code\]<select>\[/code\] element) the selected value in the \[code\]<select>\[/code\] tag should be same that I selected previously. For example if I select "Master", and then start visiting other pages and then I go back to my initial page, then "Master" should be the selected value in the \[code\]<select>\[/code\] tag. I am storing the selected item in the session, but don't know how to set the item after reading from session. Please help.
 
Top