views:

194

answers:

2

a) At the moment I have a deployed app on live on asp.mvc beta ... but few days ago it refuses to work with following error:

Method not found: 'System.String System.Web.Mvc.Html.LinkExtensions.RouteLink(System.Web.Mvc.HtmlHelper, System.String, System.Web.Routing.RouteValueDictionary, System.Web.Routing.RouteValueDictionary)'.

Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053

googed results doesn't give me something relevant :(

b) my next step was to upgrade app to asp.net mvc 1.0 ... but here I have a new issue: if in beta I had :

[AcceptVerbs(HttpVerbs.Post)]
    public ActionResult Edit(FormCollection entityform)
    {
        var entity = repository.GetById(1);

        UpdateModel(entity, entityform);
        repository.Update(entity);

        return View("Index", entity);

    }

then now the UpdateModel(map, "/ accepts IValueProvider or DefaultValueProvider /");

Questions:

  1. what was changed here? (I suppose that the hostng environment has changed something)
  2. what I should adjust here not to break already implement functionality ?
+3  A: 
UpdateModel(entity, entityform.ToValueProvider());
eu-ge-ne
+1  A: 

a) When I upgraded my web projects I noticed that what is contained in the web.configs are different. Notice there are 2 web.configs, both in the main project directory and inside the Views. I would suggest creating a new MVC 1.0 project and comparing the web.configs to your beta version.

b) I just use UpdateModel passing in the entity and this will update it accordingly if you have passed in the FormCollection to your ActionResult.

public ActionResult Edit(FormCollection entityform)
{
    var entity = repository.GetById(1);
    UpdateModel(entity);
David Liddle