Click here to Skip to main content
14,271,013 members
Rate this:
Please Sign up or sign in to vote.
See more: , +
Hello,

Right Now i am working on Umraco CMS. It's good to work on that.
But Now i have some doubts related get data from database.
My question is how to edit/delete data which are getting from database.
when i trying to click on edit button by using
@Html.ActionLink("Edit", "EditWrittenExam", new { id = certi.id })


that time "There is not current PublishedContentRequest, it must be initialized before the RenderRouteHandler executes"
this error is occurred.


Here My code.
writtenexamsurfacecontroller.cs

 public class WrittenExamSurfaceController : SurfaceController
    {  
       public ActionResult EditWrittenExam(int id)
        {
            var repo = new ABORepository();
            return View(repo);
        }

        //[HttpPost]
        [ChildActionOnly]
        public ActionResult EditWrittenExam(WrittenExam editwrittenexam)
        {
            var repo = new ABORepository();
            repo.EditWrittenExam(editwrittenexam);
            return CurrentUmbracoPage();
        }
}



Simply when i can press edit button than open new page and editable that data.


Thanks.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month



CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100