"asp-for" syntax not valid

  1. #1

    "asp-for" syntax not valid

    I have a MVC project. I am just wondering what is Equivalent to "asp-for" so that I can use Model property for value and validations. It doesn't look like a valid syntax.

    <ext-textarea asp-for="Age" ></ext-textarea>
  2. #2
    Hello, @Fahd!

    The first thing that comes to mind given your snippet is, model=, that is basically setting up the component from "code behind" (from the model). There's no asp-for in Ext.NET 7, and there were a similar concept in Ext.NET 5- which had several types of components "for" (FormPanel example), which applied basically to MVC models.

    The model= concept in Ext.NET 7 is broader (in contrast to Ext.NET 5-'s) as it is not limited to the component's data, but its actual configuration, which I believe will allow much finer-grained control over the component data, looks & validation.

    We use the concept in Examples explorers showcasing "code-behind-equivalent" examples to some "markup-driven" ones.

    Here's one example using it: Tree Panel > Built in Codebehind

    If you search for the codebehind word in Examples Explorer (top-left, there's a "filter" field), several other examples using it are shown. They don't necessarily need all set up from code behind, some configs could be set in markup and other (say, dynamic ones) in code behind/controller to customize the component's behavior.

    Hope this helps!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 4
    Last Post: Dec 01, 2017, 5:38 PM
  2. Replies: 1
    Last Post: Apr 06, 2016, 12:05 PM
  3. Replies: 3
    Last Post: Jan 28, 2016, 6:13 PM
  4. [CLOSED] The function "addScript" causing the error "Syntax Error"
    By Woyciniuk in forum 3.x Legacy Premium Help
    Replies: 22
    Last Post: Sep 26, 2015, 8:56 AM
  5. Replies: 6
    Last Post: May 31, 2013, 3:04 AM

Posting Permissions