Umbraco 5 - Package - "Save" in editor can't be found
Hello everyone,
I have just begun to work with Umbraco 5 Controllers. So far I can create a tree, make a simple view that are shown with my EditorController. Now I want to save the information in my view with "Save" but when I click it tells me that it couldn't find my controller.
Below can you see my code for the controller.
TournamentEditorController.cs
namespace LoL4U.UI.Controllers
{
[Editor("55a420e9-3410-480a-83d4-39e223e17da5")]
public class TournamentEditorController : StandardEditorController
{
public TournamentEditorController(IBackOfficeRequestContext requestContext) : base(requestContext)
{
}
public override ActionResult Edit(HiveId? id)
{
var tournamentEditorModel = new TournamentEditorModel();
if(id.HasValue)
{
Tournament tournament = Tournament.Get(Convert.ToInt32(id.Value.Value.Value));
if(tournament != null)
{
tournamentEditorModel.Title = tournament.Title;
tournamentEditorModel.Description = tournament.Description;
tournamentEditorModel.Date = Convert.ToDateTime(tournament.Date);
tournamentEditorModel.Location = tournament.Location;
tournamentEditorModel.SignUpFromDate = tournament.SignUpFrom;
tournamentEditorModel.SignUpToDate = tournament.SignUpTo;
}
}
return View("Edit",tournamentEditorModel);
}
[ActionName("Edit")]
[HttpPost]
[Save]
public ActionResult EditForm(HiveId? id)
{
return RedirectToAction("Edit", new {id});
}
}
}
I'm also very new into MVC3 and razor so it can be I have misunderstood something. When I click the disk "Save" it just tells me the page doesn't exist. Can you see what I have done wrong? If you need more code I will gladly post some more :)
Umbraco 5 - Package - "Save" in editor can't be found
Hello everyone,
I have just begun to work with Umbraco 5 Controllers. So far I can create a tree, make a simple view that are shown with my EditorController. Now I want to save the information in my view with "Save" but when I click it tells me that it couldn't find my controller.
Below can you see my code for the controller.
TournamentEditorController.cs
View: Edit.cshtml
I'm also very new into MVC3 and razor so it can be I have misunderstood something. When I click the disk "Save" it just tells me the page doesn't exist. Can you see what I have done wrong? If you need more code I will gladly post some more :)
Best Regards Martin
For some reason it seems to work now... hmm... Without any noteable changes.. :)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.