Sunday, May 11, 2014

how to pass the multiple values in session ASP.NET


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"];  
       }  


vfpoledeb.1 provider is not registered on the local machine

Have u Install VFP Ole DB Provider in your System ? If No then Please Install it from following link. http://www.microsoft.com/download...