p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional ASP.NET MVC 2 (http://p2p.wrox.com/forumdisplay.php?f=588)
-   -   Calling the "Regsiter" action method using AJAX (page 122) (http://p2p.wrox.com/showthread.php?t=81952)

bahusoid April 20th, 2011 01:03 AM

Try to disable unobtrusive java-script and check. If it works that way then may be unobtrusive library was not referenced correctly.

flyinhawaiian April 20th, 2011 01:42 PM

I think this is your problem.... in your Dinners/Details.aspx you are setting HttpMethod to "Get" when the action is expecting a post.


Code:

      <%: Ajax.ActionLink("RSVP for this event",
                        "Register",
                        "RSVP",
                        new { id = Model.DinnerID },
                        new AjaxOptions { UpdateTargetId = "rsvpmsg", HttpMethod = "Get" })%>
    <% } %>


BrennanFuchs April 20th, 2011 06:42 PM

Nah... I just put that in there to try and see if that would change behavior.

It does it wit post get or nothing as long as post is above the register function.

flyinhawaiian April 21st, 2011 01:00 PM

Well, in this case, HttpMethod should not be set to "Get".

I was able to run your code and post to the Register method. I set a breakpoint inside Register() and code execution did stop there.

noni460 December 12th, 2012 08:37 AM

i have the same problem with the ajax scripts and i put the scripts tags in <body> of the master page nothing appeared to me accept the background color any help plz ????????????


All times are GMT -4. The time now is 10:15 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.