• Documentation

    Elanat Documentation
    The most important feature of Elanat is its add-ons-oriented structure. Add-ons-oriented structure allows you to create your own Add-ons without conflicting with Eanat core.

    CodeBehind API and Applied Methods - Input place

    Input Place

    Input place is a pattern that specifies a tag that is to be modified. In the methods of the WebForms class, there are string parameters named InputPlace.

    Note: In WebForms core technology, there is also an output place pattern, which functions similarly to the input place pattern.

    There are 6 modes for selecting tag(s) in input place:

    1- Selection by id

    2- Selection by name

    3- Selection by tag name

    4- Selection by class name

    5- Selection by query

    6- Selection of multiple tags by query

    We can also nest the above input places

    We can specify InputPlace in two ways:


    1- Using the InputPlace class

    The InputPlace class is a class that is added in the same file as the WebForms class. The InputPlace class has static methods that can access all 6 modes for selecting tags.

    2- Writing the input place pattern directly

    Writing the input place pattern directly is more professional and produces less code, but it may be difficult for beginners to understand.

    Selecting Tag(s)

    The code below shows an HTML page, and the examples that follow are based on this page.

    Example
    Selecting by id

    Using the Id method on the InputPlace class, we can set the InputPlace parameter in the methods of the WebForms class.
    InputPlace.Id(Id)

    Example:

    By writing the input place pattern directly, we can also set the InputPlace parameter in the methods of the WebForms class. The id string is written directly.
    Id

    Example:

    Selecting by name

    Using the Name method on the InputPlace class, we can set the InputPlace parameter in the methods of the WebForms class.
    InputPlace.Name(Name, {Index})

    Example:

    You can also specify the index. If you don't specify the index, 0 is assumed and it will determine the first tag.

    By writing the input place pattern directly, we can also set the InputPlace parameter in the methods of the WebForms class. The name string is written inside open and close parentheses.
    (Name)

    Example:

    You can also specify the index. The number written after the parentheses specifies the index. If you don't specify the index, 0 is assumed and it will determine the first tag.

    Selecting by tag name

    Using the Tag method on the InputPlace class, we can set the InputPlace parameter in the methods of the WebForms class.
    InputPlace.Tag(Tag, {Index})

    Example:

    You can also specify the index. If you don't specify the index, 0 is assumed and it will determine the first tag.

    By writing the input place pattern directly, we can also set the InputPlace parameter in the methods of the WebForms class. The tag name is written between the less than and greater than characters.
    <Tag>

    Example:

    You can also specify the index. The number written after the greater than character specifies the index. If you don't specify the index, 0 is assumed and it will determine the first tag.

    Selecting by class name

    Using the Class method on the InputPlace class, we can set the InputPlace parameter in the methods of the WebForms class.
    InputPlace.Class(Class, {Index})

    Example:

    You can also specify the index. If you don't specify the index, 0 is assumed and it will determine the first tag.

    By writing the input place pattern directly, we can also set the InputPlace parameter in the methods of the WebForms class. The class name is written between the braces characters.
    {Class}

    Example:

    You can also specify the index. The number that is written after the closing bracket character determines the index. If you don't specify the index, 0 is assumed and it will determine the first tag.

    Selecting by query

    Using the Query method on the InputPlace class, we can set the InputPlace parameter in the methods of the WebForms class.
    InputPlace.Query(Query)

    Example:

    By writing the input place pattern directly, we can also set the InputPlace parameter in the methods of the WebForms class. The asterisk character must be written before writing the query string.
    *Query

    Example:

    Note: When writing the query pattern directly, you must use the string ($[eq];) instead of the equals character (=).

    Selecting by query all

    Using the QueryAll method on the InputPlace class, we can set the InputPlace parameter in the methods of the WebForms class. Using this method, we can select multiple tags
    InputPlace.QueryAll(Query)

    Example:

    By writing the input place pattern directly, we can also set the InputPlace parameter in the methods of the WebForms class. The open square brackets character must be written before writing the query string.
    [Query

    Example:

    Note: When writing the query all pattern directly, you must use the string ($[eq];) instead of the equals character (=).

    Selecting by nested input place

    Using the AppendPlace extension method on the InputPlace class, we can set the InputPlace parameter in the methods of the WebForms class. Using this method, we can select the label through the parent.
    InputPlace.AppendPlace(InputPlace)

    Example:

    By writing the input place pattern directly, we can also set the InputPlace parameter in the methods of the WebForms class. Each input place must be separated by a vertical bar character.
    |

    Example: