I am using MVC with C# also with jquery.
I am using an jquery accordion to see the list of employee details. On clicking an accordion it'll show the employee details.
When i click Edit of an Employee, it takes to the Employee details page and after save it'll have the EmployeeDetailsID in session. When i come back to the accordion page, the accordion with the last updated employee should be open by default (i.e. Accordion should be open based on the EmployeeDetailsID in session).
Please suggest me how to do.
Below is the code for reference.
<html>
<body>
<div class="accordion" id="accordion">
<%if (Model != null && Model.EmployeeList != null && Model.EmployeeList.Count > 0)
{
foreach (EmployeeDetails _employee in Model.EmployeeList)
{
%>
<h3>
<div class="heading_acc">
<a href="#" onclick="javascript:ShowEmployees(<%= _employee.EmployeeDetailsID %>);"
id="aEmployee"><b><span class="dash_title_bar_right">
<%=Html.Encode(_employee.EmployeeName)%></b> </a>
</div>
</h3>
<div>
<div id="divReturns<%= _employee.EmployeeDetailsID %>">
<table width="100%" class="list_contentregion">
<tr>
<th class="dash_table_head">
Name
</th>
<th class="dash_table_head">
Role
</th>
<th class="dash_table_head">
Branch
</th>
<th class="dash_table_head">
Last Updated
</th>
</tr>
<tr id="trEmp<%= _employee.EmployeeDetailsID %>" class="dash_label">
<td>
<div id="lblName<%= _employee.EmployeeDetailsID %>">
</div>
</td>
<td>
<div id="lblRole<%= _employee.EmployeeDetailsID %>">
</div>
</td>
<td>
<div id="lblBranch<%= _employee.EmployeeDetailsID %>">
</div>
</td>
<td>
<div id="lblTime<%= _employee.EmployeeDetailsID %>">
</div>
</td>
</tr>
</table>
</div>
</div>
<%}
} %>
</div>
</body>
</html>