parth gupta

parth gupta

  • NA
  • 12
  • 6.1k

How to pass DataSet from One ActionMethod To another????

Aug 30 2016 4:47 AM
        public ActionResult Admin(ObjectModel OM)
             {             
              DataSet ds = new DataSet();   
              DB objDB = new DB();    
           //Storing Dataset in model Dataset    
              OM.StoreAllData = objDB.SelectAllDetails(OM.DistrictId);  
           //Need to pass this Dataset into "Show" Method
              return RedirectToAction("show", "Appform",{ ds = OM.StoreAllData });  
           }


                         public ActionResult show(DataSet ds)  
           {      
           return View(OM);    
           }


Answers (11)