Set Value in session
// Set value in one UI in session
string empIdList = GetSelectedIDofGrid();
var paramObjects = new Dictionary<string, object>
{
{"paramEmployeeXmlstr", empIdList},
{"paramFactoryId", ddlFactoryName.SelectedValue}
};
Session["paramPayroll_RPT014_Staff"] = paramObjects;
Get value from session
// Get Value in another UI From session
private string _paramEmployeeXmlstr = String.Empty;
private string _paramFactoryId = String.Empty;
var paramObjects = Session["paramPayroll_RPT014_Staff"] as Dictionary<string, object>;
if (paramObjects != null)
{
_paramEmployeeXmlstr = (string)paramObjects["paramEmployeeXmlstr"];
_paramFactoryId = (string)paramObjects["paramFactoryId"];
}
Comments
Post a Comment