public ActionResult changclick1(companypwd pw) { if (ModelState.IsValid) { registrationEntities ob = new registrationEntities(); ObjectParameter op = new ObjectParameter("status", typeof(int)); ob.sp_comppwd(pw.oldpwd, pw.newpwd, Session["log"].ToString(), op); int i = Convert.ToInt32(op.Value); if (i == 1) { pw.result = "password changed"; return(View("changeload1", pw)); } else { pw.result = "invalid password"; return(View("changeload1", pw)); } } return(View("changload1", pw)); }