Html.BeginFormSiteFinity – namespace error

Posted by Community Admin on 04-Aug-2018 16:02

Html.BeginFormSiteFinity – namespace error

All Replies

Posted by Community Admin on 02-Jan-2018 00:00

I am going through tutorials during 30 day evaluation. In video at 1:53 it can be seen code that is no longer valid since namespace Telerik.Web.Mvc.UI does not exist in sample application.

My code:

@using Telerik.Sitefinity.UI.MVC
@using Telerik.Sitefinity.Mvc
@using SitefinityWebApp.Helpers
 
@model SitefinityWebApp.Mvc.Models.BugModel
 
<h1>Create a Bug</h1>
 
@*@using (Telerik.Sitefinity.UI.MVC.SitefinityExtensions.BeginFormSitefinity(Html, "CreateBug", "BugForm"))*@
@using (Html.BeginFormSiteFinity("CreateBug", "BugForm"))
    @Html.EditorForModel()
 
    <input type="submit" value="save" />

The code above does not employ first 2 usings so it must be worked around as you can see in commented line.

How to fix this?

See error log.

Posted by Community Admin on 03-Jan-2018 00:00

I've already answered t oyou on your question on SO: stackoverflow.com/.../48082642

 

I will repeat it here as well, in case if someone else  will have the same issue.

 

Correct method name is BeginFormSitefinity. You wrote BeginFormSiteFinity and error log is saying that it cannot find the method with this name.  You should fix your line to:

@using (Html.BeginFormSitefinity("CreateBug", "BugForm"))

 

 

This thread is closed