Ext.Net error in razon engine @Html.X(). 'System.Web.Mvc.HtmlHelper<dynamic>' does not contain a definition for 'X'

StackOverflow https://stackoverflow.com/questions/21248974

  •  30-09-2022
  •  | 
  •  

Question

I am trying to use Ext.Net in MVC 4.

In razor engine i am trying with an example like this:

@{
    Layout = "";    
}

<!DOCTYPE html> 
<html>
    <head>
        <title>Ext.NET Examples</title>
    </head>
    <body>    
        @Html.X().ResourceManager()

        @(Html.X().TabPanel()
            .Height(300)
            .Items(items => {
                items.Add(Html.X().Panel().Title("Test"));
            }));
    </body>
</html>

When i run i recieve this error in the browser:

CS1061: 'System.Web.Mvc.HtmlHelper' does not contain a definition for 'X' and no extension method 'X' accepting a first argument of type 'System.Web.Mvc.HtmlHelper' could be found (are you missing a using directive or an assembly reference?)

Any ideas?

Was it helpful?

Solution

Html.X is the MVC helper for Ext.NET which is an .NET version of extJS/Sencha. So most likely you didn't install/configure the Ext.NET properly.

I suggest you check via your project's nuget packages manager if Ext.NET is installed and then go to their website and check what is the proper web.config configuration to make it all work. Here is the link:

http://www.ext.net/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top