Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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

C#
 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900