Esempio n. 1
0
        public ActionResult ShowData()
        {
            FirstEmp E = new FirstEmp();

            E.Empno  = int.Parse(Request.Form["txtEmpno"]);
            E.Ename  = Request.Form["txtEname"];
            E.Salary = Double.Parse(Request.Form["txtSalary"]);
            return(View(E));
        }
Esempio n. 2
0
        public ActionResult SendObject()
        {
            FirstEmp E = new FirstEmp();

            E.Empno  = 1;
            E.Ename  = "Pranitha";
            E.Salary = 20000;

            return(View(E));
        }
Esempio n. 3
0
        public ActionResult SendObjectVB()
        {
            FirstEmp E = null;

            E             = new FirstEmp();
            E.Empno       = 2;
            E.Ename       = "Bajaj";
            E.Salary      = 10000;
            ViewBag.emp   = E;
            ViewData["a"] = E;
            return(View());
        }
Esempio n. 4
0
        public ActionResult SendObjects()
        {
            List <FirstEmp> L = new List <FirstEmp>();
            FirstEmp        E = null;

            E        = new FirstEmp();
            E.Empno  = 2;
            E.Ename  = "Bajaj";
            E.Salary = 10000;
            L.Add(E);

            E        = new FirstEmp();
            E.Empno  = 3;
            E.Ename  = "Ram";
            E.Salary = 20000;
            L.Add(E);
            return(View(L));
        }
Esempio n. 5
0
        public ActionResult SendObjectsVB()
        {
            List <FirstEmp> L = new List <FirstEmp>();
            FirstEmp        E = null;

            E        = new FirstEmp();
            E.Empno  = 2;
            E.Ename  = "Bajaj";
            E.Salary = 10000;
            L.Add(E);

            E        = new FirstEmp();
            E.Empno  = 3;
            E.Ename  = "Ram";
            E.Salary = 30000;
            L.Add(E);
            ViewBag.emp   = L;
            ViewData["a"] = L;
            return(View());
        }
Esempio n. 6
0
 public ActionResult Index1(FirstEmp E)
 {
     return(View("Display", E));
 }
Esempio n. 7
0
        public ActionResult Index1()
        {
            FirstEmp E = new FirstEmp();

            return(View(E));
        }
Esempio n. 8
0
 public ActionResult Display(FirstEmp A)
 {
     return(View(A));
 }