ejaz mirza

ejaz mirza

  • NA
  • 471
  • 45.3k

redrected controller view is not displaying

Jul 3 2018 2:41 AM
  1. public ActionResult chartofaccountedit(String name)  
  2.        {  
  3.            treeviewlist();  
  4.            chartofaccount data=new chartofaccount();  
  5.             
  6.            if (name == null)  
  7.            {  
  8.   
  9.   
  10.                return View("chartofaccountscreate");  
  11.            }  
  12.            else  
  13.            {  
  14.   
  15.                data = mse.chartofaccounts.SingleOrDefault(x => x.AccountName == name);  
  16.                 
  17.                if (data == null)  
  18.                {  
  19.                    return View("chartofaccountscreate");  
  20.                }  
  21.                else  
  22.                {  
  23.                    //  data.AccountName="mirza";  
  24.                      
  25.                 //   int id =Convert.ToInt16( data.ID);  
  26.                    return RedirectToAction("chartofaccountscreate""chartofaccounts", data);  
  27.            }  
  28.   
  29.            }  
  30.   
  31.        }  
  32.   
  33.   
  34.  public ActionResult chartofaccountscreate(chartofaccount data)  
  35.        {  
  36.              
  37.            treeviewlist();  
  38.            chartofaccount ca = new chartofaccount();  
  39.            ca.AccountName = data.AccountName;  
  40.            return View(ca);  
  41.        }  
when i redirecting to the create view is not displaying what will be the problem

Answers (2)