1

Server Error in '/' Application. The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested URL: /Contact/PopBid

Controller

[HttpPost]
    public ActionResult PopBid(int jobid)
    {

        var getjob = _context.jobService.GetById(jobid);
        return View();
    }

JavaScript

      function Singin(jobid) {
            $.fancybox({

                'transitionIn': 'elastic',
                'transitionOut': 'elastic',
                'easingIn': 'easeOutBack',
                'easingOut': 'easeInBack',
                'width': 850,
                'height': 394,
                href: "/Contact/PopBid",
                data: "jobid=" + jobid,
                'type': 'iframe'
            });
        }s

 <img alt="" onclick="javascript:Singin(@job.ID);" src="/Content/WalkFish/Images/bidimg1.png" style="width: 180px; height: 140px;">

onclick event

pop open well but get error in the pop that

Server Error in '/' Application. The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested URL: /Contact/PopBid

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929

0

1 Answer 1

2

Looks like you are GETing /Contact/PopBid not POSTing to it. Because of the [HttpPost] attribute above you method the GET action is not available.

Change the attribute to [HttpGet]

[HttpGet]
public ActionResult PopBid(int jobid)
{

    var getjob = _context.jobService.GetById(jobid);
    return View();
}
Sign up to request clarification or add additional context in comments.

3 Comments

after making it [HttpGet]getting this error The parameters dictionary contains a null entry for parameter 'jobid' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult PopBid(Int32)' in 'WMF.Controllers.ContactController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter. Parameter name: parameters
Try data: { jobid: jobid }, Check the URL that's build using the network tracer in you browser or somthing like Fiddler
AliRıza Adıyahşi no it is not null

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.