nerddinner aplication based problem

May 11, 2009 at 4:41 PM


I was trying to implement a possibility to UnRegister from a lets say dinner in my mvc application. I tried to use the same structure as in Register model but sth is wrong... I'm complete beginner and I can't solve it. Could anyone help me ? thanks.



        // AJAX: /Games/UnRSVPFromEvent/1

        [Authorize, AcceptVerbs(HttpVerbs.Post)]

        public ActionResult UnRegister(int id)
            Game game = gameRepository.GetGame(id);
            if (game.IsUserRegistered(User.Identity.Name))
                Rsvp rsvp = new Rsvp();
                rsvp.AttendeeName = User.Identity.Name;


            return Content("some text.");





and code from details.aspx (AJAX ):

<%= Ajax.ActionLink ( " Quit game", "UnRegister" ,"RSVP",
                                    new { id=Model.GameID },
                                    new AjaxOptions { UpdateTargetId="rsvpmsg",