public ActionResult Index(FormCollection collection) { try { var name = collection["Name"]; var pwd = collection["PassWord"]; var cpwd = collection["ConfirmPassWord"]; if (pwd != cpwd) { return(View()); } var api = new ApiReceive { URL = string.Format("{0}", ConfigHelper.GetApiUrl()), Resource = String.Format("api/System?name={0}&pwd={1}&confirm={2}", name, pwd, cpwd), }; var result = api.GetJsonToFromBody(); api.Dispose(); return(View()); } catch (Exception ex) { return(View(ex)); } }