WebForms Core is a high-level technology created by Elanat in 2024. WebForms Core technology allows the management of HTML tags via the server by eliminating the front-end part and making the web development process simpler and faster. WebForms Core technology includes the WebForms class on the server and the WebFormsJS library on the client. In this technology, sending data to the server is done automatically and completely faithfully to HTML while maintaining the page state, through the XMLHttpRequest object in JavaScript. The server also sends Action Controls codes to the client, which are rendered by the WebFormsJS library and then applied to the page.
The WebForms class includes methods that place Action Controls codes in the server response and send them to WebFormsJS. Action Controls are text codes that are placed together in INI format.
WebForms Core technology is a feature built into the CodeBehind framework. However, Elanat also offers this technology for other programming languages and back-end frameworks.
The WebForms class is available in several programming languages, and you can get these classes from the link below.
WebForms ClassesYou can also download the WebFormsJS library from the link below.
WebFormsJSPlease note that the features of these classes may be backward compatible with the WebForms class in CodeBehind.
We encourage experienced developers to update the WebForms class in their programming language to match the WebForms class in CodeBehind (make a pull request to the above repository).
The WebForms class in CodeBehind is available from the link below.
CodeBehind framework WebForms classIn this content, we introduce how the methods of the WebForms class in CodeBehind work.
Note: Please note that some programming languages may not have the method overloading feature in C# and the way to call the methods of the WebForms class may differ from what is introduced in this content.
Methods starting with Add add a value to the current value:
Sends the value of the id attribute.
Sends the value of the name attribute.
Sends the value of the value attribute.
Sends the value of the class attribute.
Sends the value of the style.
Sends the command to create an option tag.
Sends the command to create an checkbox tag.
Sends the value of the title. If the tag is input type, the value is added to the label tag; Otherwise, the value is added to the title attribute.
Sends the internal value of the tag.
Sends the internal value of the tag to be added before the current tag value.
Sends the value of the attribute name and attribute value.
Sends the command to create a tag based on the tag name.
The command creates a tag at the beginning of the tag based on the tag name.
The command creates a tag before the tag based on the tag name.
The command creates a tag after the tag based on the tag name.
Methods starting with Set replaces the current value with a value. If a value does not already exist, it adds the value:
Sends the value of the id attribute.
Sends the value of the name attribute.
Sends the value of the value attribute.
Sends the value of the class attribute.
Sends the value of the style.
Sends the command to create an option tag.
Sending a command to check and uncheck a checkbox.
Sends the value of the title. If the tag is input type, the value is added to the label tag; Otherwise, the value is added to the title attribute.
Sends the internal value of the tag.
Sends the value of the attribute name and attribute value.
Sends the command to set the tag width.
Sends the command to set the tag height.
Methods that start with Insert add a new value to the tag if it doesn't already have one:
Sends the value of the id attribute.
Sends the value of the name attribute.
Sends the value of the value attribute.
Sends the value of the class attribute.
Sends the value of the style attribute.
Sends the command to create an option tag.
Sends the command to create an checkbox tag.
Sends the value of the title. If the tag is input type, the value is added to the label tag; Otherwise, the value is added to the title attribute.
Sends the internal value of the tag.
Sends the value of the attribute name and attribute value.
Methods that start with Delete remove attributes or elements:
Sends the command to delete id attribute.
Sends the command to delete name attribute.
Sends the command to delete value attribute.
Sends the command to delete class name in class attribute.
Sends the command to delete style name (and value) in style attribute.
Sends the command to delete option tag in select input.
Sends the command to delete all option tag in select input.
Sends the command to delete checkbox input in a tag.
Sends the command to delete all checkbox input in a tag.
Sends the command to delete title. If the tag is of type input, the label tag is removed. Otherwise, the title tag attribute is deleted.
Sends the command to delete the internal value of the tag.
Sends the command to delete attribute in tag.
Sends the command to delete tag.
Additional methods for various functionalities:
Sends the command to set the background color of the tag.
Sends the command to set the tag text color.
Sends the command to specify the tag font name.
Sends the command to set the tag font size.
Sends a command to determine whether the tag font should be bold or not.
Sends a command to determine whether the tag is visible or not.
Sends the command to specify the alignment of the tag text.
The command specifies whether the tag is read-only or not.
Sends a command to determine whether the tag is disable or not.
Sends a command to set focus on the tag.
Sends a command to determine the minimum string length on the tag.
Sends a command to determine the maximum string length on the tag.
Sends a command to select a value based on the selected value on the select tag.
Sends a command to select a value based on the index on the select tag.
Sends a command to check or uncheck a checkbox by value in a tag.
Sends a command to check or uncheck a checkbox by index in a tag.
Submits a script for execution.
Sends a command to load a specified URL into the given tag.
Sends a command to change the current page URL to the specified URL.
Sends a command to remove a specific item from session cache using its key.
Sends a command to clear all items from session cache
Sends a command to remove a specific item from general cache using its key.
Sends a command to clear all items from general cache.
Sends a command to save server response in session cache.
Sends a command to save server response in cache.
Methods to increase values:
Sends a command to increase the minimum string length by a value.
Sends a command to increase the maximum length of a string by a value.
Sends a command to increase the tag font size based on the value.
Sends a command to increase the width of the tag based on the value.
Sends a command to increase the height of the tag based on the value.
Sends a command to increment the value by the value.
Methods to descrease values:
Sends a command to reduce the minimum string length by a value.
Sends a command to reduce the maximum length of a string based on a value.
Sends a command to descrease the tag font size based on the value.
Sends a command to descrease the width of the tag based on the value.
Sends a command to descrease the height of the tag based on the value.
Sends a command to decrement the value by the value.
These methods add various events to HTML tags:
It assigns an event to a form tag (by adding the event attribute), and after the event is executed, it sends its name and value to the server, along with the names and values of other form tags. This method replaces the server response with the current HTML page (If the server response is not an Action Controls).
Similar to the SetPostEvent
method, but preserves the page state and appends the server response to the beginning of the HTML page (If the server response is not an Action Controls).
It is similar to the SetPostEvent
method but adds the server response in an HTML tag. (If the server response is not an Action Controls).
It is similar to the SetPostEvent
method, but uses an event listener instead of an attribute event.
It is similar to the SetPostEventAdding
method, but uses an event listener instead of an attribute event.
It is similar to the SetPostEventTo
method, but uses an event listener instead of an attribute event.
An event is assigned a tag so that after the event occurs, a path is requested from the server.
It is an overload of the SetGetEvent
method and its functionality is similar, but adds the server response in an HTML tag. (If the server response is not an Action Controls).
It is similar to the SetPostEvent
method but the path of the form tag where the tag is located is requested from the server.
It is an overload of the SetGetEventInForm
method and its functionality is similar, but adds the server response in an HTML tag. (If the server response is not an Action Controls).
It is similar to the SetGetEvent
method, but uses an event listener instead of an attribute event.
It is similar to the SetGetEvent
overload, but uses an event listener instead of an attribute event.
It is similar to the SetGetEventInForm
method, but uses an event listener instead of an attribute event.
It is similar to the SetGetEventInForm
overload, but uses an event listener instead of an attribute event.
Assigns an event to a tag so that after the event occurs, action controls can be requested from the ac attribute in a web-forms tag without the need for a server.
It is similar to the SetTagEvent
method, but uses an event listener instead of an attribute event.
Sends a command to delete the post request event on the tag.
Sends a command to delete the get request event on the tag.
Sends a command to delete the tag request event on the tag.
Sends a command to delete the post request event listener on the tag.
Sends a command to delete the get request event listener on the tag.
Sends a command to delete the tag request event listener on the tag.
These methods save the properties of a tag. If we use the caching feature, the Save methods allow us to manage tags without the need for a server:
Sends a command to save the value of the tag's id attribute.
Sends a command to save the value of the tag's name attribute.
Sends a command to save the value of the tag's.
Sends a command to save the length of the tag's value string.
Sends a command to save the value of the tag's class attribute.
Sends a command to save the value of the tag's style attribute.
Sends a command to save the value of the tag's title. If the tag is an input type, the value of the tag's label is saved. Otherwise, the value of the added title attribute is saved.
Sends a command to save the value of the tag's text attribute.
Sends a command to save the length of the tag's text attribute string.
Sends a command to save the value of a tag attribute.
Sends a command to save the tag width.
Sends a command to save the tag height.
Sends a command to save the tag's read-only status.
Sends a command to save the selected value of the drop-down list.
Sends a command to save the tag's text-align status.
Sends a command to store the number of child nodes of the tag.
Sends a command to save the tag's visible status.
Methods to append commands to previous commands before executing them:
Assigns a delay value to the last command. This delay causes the command to be rendered after the break.
Assigns a time cycle value based on intervals to the last command. This time cycle causes the command to be rendered after consecutive intervals.