开发者

JQuery Post Undefined

开发者 https://www.devze.com 2023-03-25 18:36 出处:网络
Can someone please tell me what I\'m doing wrong here. I\'ve done a post call many times before without issues but today this one is giving me problems. I\'m using asp.net MVC 3

Can someone please tell me what I'm doing wrong here. I've done a post call many times before without issues but today this one is giving me problems. I'm using asp.net MVC 3

 $('#CancelButton').click(function(){
        var emailUrl = $('.emailUrl').attr('id');
        $.Post('@Url.Content("~/")Offer/DeleteImage/?Url=' + emailUrl + '&imageName=' + imageName, function(data) {
        });
    });

I get this error:

TypeError: 'undefined' is not a function (evaluating '$.Post('/Offer/DeleteImage/?Url开发者_StackOverflow=' + emailUrl + '&imageName=' + imageName, function(data) { })')

And I have this in my shared layout

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" type="text/javascript"></script>

Other Views have jquery working fine, but I have not used a post call on this project so maybe I'm just making a simple mistake :)

Thanks!


$.Post

should be

$.post

It's case sensitive.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号