<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Elanat Framework</title>
    <description>The latest articles on Forem by Elanat Framework (@elanatframework).</description>
    <link>https://forem.com/elanatframework</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1106033%2F62106011-1779-4f5a-a8a7-ec2a51ced727.png</url>
      <title>Forem: Elanat Framework</title>
      <link>https://forem.com/elanatframework</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/elanatframework"/>
    <language>en</language>
    <item>
      <title>Using the Segment Feature</title>
      <dc:creator>Elanat Framework</dc:creator>
      <pubDate>Fri, 27 Feb 2026 21:28:20 +0000</pubDate>
      <link>https://forem.com/elanatframework/using-the-segment-feature-5bp5</link>
      <guid>https://forem.com/elanatframework/using-the-segment-feature-5bp5</guid>
      <description>&lt;p&gt;&lt;strong&gt;Segment&lt;/strong&gt; is an attribute that can be applied to ASPX pages. When this feature is enabled, all path parts that appear after the aspx file path are treated as segments and routed to the same executing page. Segment is one of the innovative ideas of the &lt;a href="https://elanat.net" rel="noopener noreferrer"&gt;Elanat&lt;/a&gt; team. By enabling Segment, you gain full control over URL paths.&lt;/p&gt;




&lt;h2&gt;
  
  
  Enabling Segment
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Razor Syntax
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;@page
&lt;span class="gi"&gt;+@segment
&lt;/span&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Standard ASPX Syntax
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;&lt;/span&gt;&lt;span class="err"&gt;%@&lt;/span&gt; &lt;span class="na"&gt;Page&lt;/span&gt; &lt;span class="na"&gt;Segment=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt; &lt;span class="err"&gt;%&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  How Segment Works
&lt;/h2&gt;

&lt;p&gt;If you enable Segment on the following path:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/page/about.aspx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Any additional path parts after this address will be considered segments, and the executable file &lt;code&gt;/page/about.aspx&lt;/code&gt; will still be executed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/page/about.aspx/segment1/segment2/.../segmentN
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If Segment is enabled on a file such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/page/about/Default.aspx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can still access it using both of the following formats:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/page/about/Default.aspx/segment1/segment2/.../segmentN
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/page/about/segment1/segment2/.../segmentN
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Accessing Segment Values
&lt;/h2&gt;

&lt;p&gt;You can access Segment values in all three layers: &lt;strong&gt;View, Controller, and Model&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Segments are zero-based indexed.&lt;/p&gt;

&lt;p&gt;Given the URL:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/page/about/segment1/segment2/segment3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Segment.GetValue(0)&lt;/code&gt; returns &lt;code&gt;"segment1"&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Segment.GetValue(1)&lt;/code&gt; returns &lt;code&gt;"segment2"&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Segment.GetValue(2)&lt;/code&gt; returns &lt;code&gt;"segment3"&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In general:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Segment.GetValue(n)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;returns the segment at index &lt;code&gt;n&lt;/code&gt; (starting from 0).&lt;/p&gt;




&lt;h3&gt;
  
  
  Example in View (Razor)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;b&amp;gt;segment 1 is: @Segment.GetValue(0)&amp;lt;/b&amp;gt;
&amp;lt;b&amp;gt;segment 2 is: @Segment.GetValue(1)&amp;lt;/b&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Example in View (Standard ASPX)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;b&amp;gt;segment 1 is: &amp;lt;%= Segment.GetValue(0) %&amp;gt;&amp;lt;/b&amp;gt;
&amp;lt;b&amp;gt;segment 2 is: &amp;lt;%= Segment.GetValue(1) %&amp;gt;&amp;lt;/b&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Example in Controller
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="p"&gt;using CodeBehind;
&lt;/span&gt;&lt;span class="err"&gt;
&lt;/span&gt;&lt;span class="p"&gt;namespace YourProjectName
&lt;/span&gt;{
    public partial class DefaultController : CodeBehindController
    {
        public void PageLoad(HttpContext context)
        {
&lt;span class="gi"&gt;+           Write(Segment.GetValue(0));
+           Write(Segment.GetValue(1));
&lt;/span&gt;        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By activating Segment, you no longer need to use query strings to pass parameters through the URL.&lt;/p&gt;




&lt;h2&gt;
  
  
  Important Behavior
&lt;/h2&gt;

&lt;p&gt;If you enable Segment on a specific path, ASPX view files located in its subdirectories will not be executed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example
&lt;/h3&gt;

&lt;p&gt;If Segment is enabled on:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/page/about/Default.aspx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then the following path will no longer be accessible:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/page/about/license/Default.aspx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Checking Segment Existence
&lt;/h2&gt;

&lt;p&gt;You can use the &lt;code&gt;Exist&lt;/code&gt; method to check whether a segment value exists before accessing it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;@if (!Segment.Exist(0))
{
    &lt;span class="nt"&gt;&amp;lt;b&amp;gt;&lt;/span&gt;Value does not exist&lt;span class="nt"&gt;&amp;lt;/b&amp;gt;&lt;/span&gt;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Segment in Default MVC Configuration
&lt;/h2&gt;

&lt;p&gt;In the default MVC configuration, the Segment feature is enabled automatically in controller routing.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;CodeBehind&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;partial&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;user&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;CodeBehindController&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;PageLoad&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;HttpContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;   
        &lt;span class="nf"&gt;Write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Segment&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;GetValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt; &lt;span class="c1"&gt;// path: /user/{id}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Rewrite ASPX Path as Directory
&lt;/h2&gt;

&lt;p&gt;One of the interesting ideas introduced by the Elanat team in the CodeBehind framework is the ability to rewrite an aspx file path as a directory name.&lt;/p&gt;

&lt;p&gt;When this option is enabled, routes leading to an aspx file without the &lt;code&gt;.aspx&lt;/code&gt; extension will be treated as directory paths.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="nn"&gt;[CodeBehind options]&lt;/span&gt;&lt;span class="c"&gt;; do not change order
&lt;/span&gt;&lt;span class="err"&gt;...&lt;/span&gt;
&lt;span class="py"&gt;rewrite_aspx_file_to_directory&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;
&lt;span class="err"&gt;...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; You can safely enable this option because this rewrite does not introduce any additional processing load.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example
&lt;/h3&gt;

&lt;p&gt;Access:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/page/contact.aspx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/page/contact
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And also:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/page/contact/segment1/segment2/.../segmentN
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Related links
&lt;/h2&gt;

&lt;p&gt;CodeBehind on GitHub:&lt;br&gt;
&lt;a href="https://github.com/elanatframework/Code_behind" rel="noopener noreferrer"&gt;https://github.com/elanatframework/Code_behind&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;CodeBehind in NuGet:&lt;br&gt;
&lt;a href="https://www.nuget.org/packages/CodeBehind/" rel="noopener noreferrer"&gt;https://www.nuget.org/packages/CodeBehind/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;CodeBehind page:&lt;br&gt;
&lt;a href="https://elanat.net/page_content/code_behind" rel="noopener noreferrer"&gt;https://elanat.net/page_content/code_behind&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>dotnet</category>
      <category>beginners</category>
      <category>backend</category>
    </item>
    <item>
      <title>🎬 Video - Using WebForms Core in ASP.NET MVC</title>
      <dc:creator>Elanat Framework</dc:creator>
      <pubDate>Fri, 27 Feb 2026 12:47:45 +0000</pubDate>
      <link>https://forem.com/elanatframework/video-using-webforms-core-in-aspnet-mvc-2kio</link>
      <guid>https://forem.com/elanatframework/video-using-webforms-core-in-aspnet-mvc-2kio</guid>
      <description>&lt;p&gt;In this video, we will teach you how to configure and use Elanat's WebForms Core technology in ASP.NET MVC.&lt;/p&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/T0bTzUmX7BU"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;




&lt;h2&gt;
  
  
  Is Blazor a Replacement for WebForms?
&lt;/h2&gt;

&lt;p&gt;Microsoft officially presents it as such, but the technical reality is more nuanced:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Blazor = Component-Based Framework&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;WebForms = Event-Driven Page Model&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These two are built on fundamentally different architectural philosophies.&lt;/p&gt;

&lt;p&gt;📌 &lt;strong&gt;Blazor is not a technical replacement for WebForms; it is a strategic replacement.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Blazor is designed around a component-based architecture, whereas WebForms was built on a page-centric, event-driven model. Therefore, they cannot be considered equivalent.&lt;/p&gt;




&lt;h2&gt;
  
  
  The WebForms Core Perspective on Modern Architecture
&lt;/h2&gt;

&lt;p&gt;WebForms Core does not “destroy” the separation between front-end and back-end;&lt;br&gt;
it &lt;strong&gt;abstracts&lt;/strong&gt; it.&lt;/p&gt;

&lt;p&gt;Instead of forcing developers to build and maintain two separate projects using two different languages, this architecture turns the front-end into an execution layer that is controlled entirely from the server-side language.&lt;/p&gt;

&lt;p&gt;In this approach, user interactions remain modern, dynamic, and refresh-free, while the complexity of managing front-end code is removed or hidden from the developer.&lt;/p&gt;




&lt;h2&gt;
  
  
  From AJAX to WebForms Core
&lt;/h2&gt;

&lt;p&gt;Technologies like AJAX in 2005 created a major shift in web development by enabling data exchange without requiring a full page refresh.&lt;/p&gt;

&lt;p&gt;WebForms Core can be seen as the most evolved continuation of that path — a transition from:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Interaction without page refresh”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;to&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Interaction without direct front-end coding.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is not merely a tooling change;&lt;br&gt;
it represents a shift in development philosophy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Related links
&lt;/h2&gt;

&lt;p&gt;Get WFC Package from NuGet:&lt;br&gt;
&lt;a href="https://www.nuget.org/packages/WFC" rel="noopener noreferrer"&gt;https://www.nuget.org/packages/WFC&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Get ResponseWrite Package from NuGet:&lt;br&gt;
&lt;a href="https://www.nuget.org/packages/ResponseWrite" rel="noopener noreferrer"&gt;https://www.nuget.org/packages/ResponseWrite&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WebFormsJS on GitHub:&lt;br&gt;
&lt;a href="https://github.com/elanatframework/Web_forms" rel="noopener noreferrer"&gt;https://github.com/elanatframework/Web_forms&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WebFormsJS page:&lt;br&gt;
&lt;a href="https://elanat.net/page_content/web_forms_js" rel="noopener noreferrer"&gt;https://elanat.net/page_content/web_forms_js&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WebForms Classes on GitHub:&lt;br&gt;
&lt;a href="https://github.com/elanatframework/Web_forms_classes" rel="noopener noreferrer"&gt;https://github.com/elanatframework/Web_forms_classes&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WebForms Core Organizations on GitHub:&lt;br&gt;
&lt;a href="https://github.com/webforms-core" rel="noopener noreferrer"&gt;https://github.com/webforms-core&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WebForms Core page:&lt;br&gt;
&lt;a href="https://elanat.net/page_content/web_forms_core" rel="noopener noreferrer"&gt;https://elanat.net/page_content/web_forms_core&lt;/a&gt;&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>tutorial</category>
      <category>fullstack</category>
      <category>webformscore</category>
    </item>
    <item>
      <title>ViewData in CodeBehind: Data Transfer Across MVC Components</title>
      <dc:creator>Elanat Framework</dc:creator>
      <pubDate>Fri, 27 Feb 2026 09:33:28 +0000</pubDate>
      <link>https://forem.com/elanatframework/viewdata-in-codebehind-data-transfer-across-mvc-components-1j3l</link>
      <guid>https://forem.com/elanatframework/viewdata-in-codebehind-data-transfer-across-mvc-components-1j3l</guid>
      <description>&lt;p&gt;The &lt;strong&gt;ViewData&lt;/strong&gt; feature in the CodeBehind framework, developed by &lt;a href="https://elanat.net" rel="noopener noreferrer"&gt;Elanat&lt;/a&gt;, is a simple and practical mechanism for transferring data between different components of the MVC architecture.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is ViewData?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;ViewData&lt;/code&gt; is a data list of type &lt;strong&gt;NameValue (Key-Value)&lt;/strong&gt;.&lt;br&gt;
This structure allows you to store data with a specific key and retrieve it in other parts of the same request.&lt;/p&gt;

&lt;p&gt;ViewData is used to transfer data between MVC components and supports &lt;strong&gt;both reading and writing&lt;/strong&gt; in the following sections:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Controller&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Model&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;View&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Layout&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  ViewData Lifetime
&lt;/h2&gt;

&lt;p&gt;An important point to consider is that the data stored in ViewData is &lt;strong&gt;valid only during the current HTTP request&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This means that once the request is completed and the response is sent to the client, the ViewData values are cleared and will not be available in subsequent requests.&lt;/p&gt;


&lt;h2&gt;
  
  
  Comparison with ASP.NET
&lt;/h2&gt;

&lt;p&gt;The overall behavior of ViewData in CodeBehind is very similar to ViewData in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ASP.NET MVC&lt;/li&gt;
&lt;li&gt;ASP.NET Razor Pages&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you have previously worked with these technologies, using ViewData in CodeBehind will feel familiar and intuitive.&lt;/p&gt;


&lt;h2&gt;
  
  
  Writing Priority in ViewData
&lt;/h2&gt;

&lt;p&gt;The writing priority order in ViewData is as follows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Controller&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Model&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;View&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This reflects the execution flow of the MVC pattern.&lt;/p&gt;

&lt;p&gt;If a new ViewData value is created inside the View, it cannot be read in the Controller, because the Controller executes before the View.&lt;/p&gt;


&lt;h2&gt;
  
  
  Example: Using ViewData in a View
&lt;/h2&gt;

&lt;p&gt;In the following example, the &lt;code&gt;title&lt;/code&gt; value is set inside the View:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;@page&lt;/span&gt;
&lt;span class="n"&gt;@controller&lt;/span&gt; &lt;span class="n"&gt;CacheThemeController&lt;/span&gt;
&lt;span class="n"&gt;@layout&lt;/span&gt; &lt;span class="s"&gt;"/layout.aspx"&lt;/span&gt;
&lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;ViewData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"Cache Theme"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, the value &lt;code&gt;"Cache Theme"&lt;/code&gt; is stored with the key &lt;code&gt;"title"&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Accessing ViewData in a Layout
&lt;/h2&gt;

&lt;p&gt;The stored value can be retrieved inside the Layout file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;@page&lt;/span&gt;
&lt;span class="n"&gt;@islayout&lt;/span&gt;
&lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;WelcomeText&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Welcome to the CodeBehind Framework!"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;!&lt;/span&gt;&lt;span class="n"&gt;DOCTYPE&lt;/span&gt; &lt;span class="n"&gt;html&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;html&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;head&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;CodeBehind&lt;/span&gt; &lt;span class="n"&gt;Framework&lt;/span&gt; &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="n"&gt;@ViewData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;GetValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;)&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, the &lt;code&gt;title&lt;/code&gt; value defined in the View is accessed in the Layout and displayed inside the &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt; tag.&lt;/p&gt;




&lt;h2&gt;
  
  
  Using ViewData in a Controller
&lt;/h2&gt;

&lt;p&gt;You can also assign values inside a Controller:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;PageLoad&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;HttpContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;   
    &lt;span class="n"&gt;ViewData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Adriano"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this case, the value &lt;code&gt;"Adriano"&lt;/code&gt; is stored in ViewData and becomes accessible in the View.&lt;/p&gt;




&lt;h2&gt;
  
  
  Reading ViewData in a View
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;@page&lt;/span&gt;
&lt;span class="n"&gt;@controller&lt;/span&gt; &lt;span class="n"&gt;ChangeListController&lt;/span&gt;

&lt;span class="n"&gt;Name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;@ViewData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;GetValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, the value associated with the specified key is retrieved from ViewData and rendered in the View.&lt;/p&gt;




&lt;h2&gt;
  
  
  Advantages of ViewData
&lt;/h2&gt;

&lt;p&gt;Using ViewData in CodeBehind offers several advantages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Simple Key-Value structure&lt;/strong&gt; for lightweight data transfer&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No need to create additional models&lt;/strong&gt; for small or temporary data&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Accessible across Controller, Model, View, and Layout&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Request-scoped lifetime&lt;/strong&gt;, ensuring clean and predictable data handling&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lightweight and fast&lt;/strong&gt;, with minimal overhead&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Familiar pattern&lt;/strong&gt; for developers coming from ASP.NET MVC or Razor Pages&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;ViewData in CodeBehind is a lightweight, flexible, and efficient mechanism for transferring data between MVC components within a single request.&lt;/p&gt;

&lt;p&gt;It is especially suitable for passing small pieces of data such as page titles, UI settings, temporary messages, or configuration values—without introducing unnecessary complexity into your application architecture.&lt;/p&gt;




&lt;h2&gt;
  
  
  Related links
&lt;/h2&gt;

&lt;p&gt;CodeBehind on GitHub:&lt;br&gt;
&lt;a href="https://github.com/elanatframework/Code_behind" rel="noopener noreferrer"&gt;https://github.com/elanatframework/Code_behind&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;CodeBehind in NuGet:&lt;br&gt;
&lt;a href="https://www.nuget.org/packages/CodeBehind/" rel="noopener noreferrer"&gt;https://www.nuget.org/packages/CodeBehind/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;CodeBehind page:&lt;br&gt;
&lt;a href="https://elanat.net/page_content/code_behind" rel="noopener noreferrer"&gt;https://elanat.net/page_content/code_behind&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>dotnet</category>
      <category>beginners</category>
      <category>backend</category>
    </item>
    <item>
      <title>Why You Can’t Write to the Response in ASP.NET Core (And How to Fix It)</title>
      <dc:creator>Elanat Framework</dc:creator>
      <pubDate>Tue, 24 Feb 2026 16:41:15 +0000</pubDate>
      <link>https://forem.com/elanatframework/why-you-cant-write-to-the-response-in-aspnet-core-and-how-to-fix-it-43dn</link>
      <guid>https://forem.com/elanatframework/why-you-cant-write-to-the-response-in-aspnet-core-and-how-to-fix-it-43dn</guid>
      <description>&lt;p&gt;In ASP.NET Core, once a View starts rendering, your ability to modify the response is essentially gone. Try writing to &lt;code&gt;Response.Body&lt;/code&gt; — and you’ll quickly hit a wall.&lt;/p&gt;

&lt;p&gt;If you’ve ever tried writing to &lt;code&gt;Response.Body&lt;/code&gt; after a Razor View or MVC Controller started rendering, you know the pain: &lt;code&gt;System.InvalidOperationException: Response already started&lt;/code&gt;!&lt;/p&gt;

&lt;p&gt;This is not just an exception problem — it’s a response pipeline limitation.&lt;/p&gt;

&lt;p&gt;We at &lt;a href="https://elanat.net" rel="noopener noreferrer"&gt;Elanat&lt;/a&gt; recently released a &lt;strong&gt;lightweight&lt;/strong&gt; middleware called &lt;strong&gt;ResponseWrite&lt;/strong&gt; that solves this problem in a clean and modular way.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;In ASP.NET Core, once headers are sent or the View starts rendering, writing directly to the response stream usually triggers errors. Microsoft's usual workaround—&lt;code&gt;ViewData&lt;/code&gt;, &lt;code&gt;ViewBag&lt;/code&gt;, Partial Views, or View Components—is &lt;strong&gt;not dynamic, tightly couples modules to Views, and isn’t usable from middleware&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwlqwif1u96s18dycsp8q.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwlqwif1u96s18dycsp8q.jpg" alt="ASP.NET Core WriteAsync problem" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Microsoft’s Recommended Approach (Not a Real Solution)
&lt;/h2&gt;

&lt;p&gt;Instead of writing directly to the response stream, the typical recommendation is to pass data from the PageModel (or Controller) to the View using &lt;code&gt;ViewData&lt;/code&gt; (or &lt;code&gt;ViewBag&lt;/code&gt;).&lt;/p&gt;

&lt;h4&gt;
  
  
  PageModel
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;IndexModel&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;PageModel&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;IActionResult&lt;/span&gt; &lt;span class="nf"&gt;OnGet&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;ViewData&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"FooterMessage"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Hello from Elanat!"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;Page&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  View (&lt;code&gt;Index.cshtml&lt;/code&gt;)
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;@page
@model IndexModel
&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Microsoft Recommended Pattern&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Welcome&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;This is content from the View.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;

    @ViewData["FooterMessage"]
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Why This Doesn’t Truly Solve the Problem
&lt;/h3&gt;

&lt;p&gt;This works — but only because the View was &lt;strong&gt;explicitly modified&lt;/strong&gt; to render &lt;code&gt;@ViewData["FooterMessage"]&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The injection point must already exist.&lt;/li&gt;
&lt;li&gt;The View must know the exact key name.&lt;/li&gt;
&lt;li&gt;Middleware cannot safely use this pattern.&lt;/li&gt;
&lt;li&gt;Modules are tightly coupled to specific Views.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is a View-level data passing technique — not a response pipeline solution.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Solution
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;ResponseWrite&lt;/strong&gt; queues content during request execution and appends it to the response &lt;strong&gt;just before it’s closed&lt;/strong&gt;. You can use it anywhere: Razor Pages, MVC Controllers, or even other middleware.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Razor Page (&lt;code&gt;.cshtml&lt;/code&gt;)
&lt;/h4&gt;

&lt;p&gt;Assuming your Razor Page is &lt;code&gt;Index.cshtml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;@page
@model IndexModel
&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;ResponseWrite Demo&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Welcome to ResponseWrite Demo&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;This is content from the View.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Page Model (&lt;code&gt;Index.cshtml.cs&lt;/code&gt;)
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;Microsoft.AspNetCore.Mvc&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;Microsoft.AspNetCore.Mvc.RazorPages&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;IndexModel&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;PageModel&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;IActionResult&lt;/span&gt; &lt;span class="nf"&gt;OnGet&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello from Elanat!"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Safe anytime&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;Page&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When &lt;code&gt;Response.Write&lt;/code&gt; is called:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The content is queued during request execution.&lt;/li&gt;
&lt;li&gt;The View is rendered normally.&lt;/li&gt;
&lt;li&gt;Just before the response is finalized, &lt;code&gt;ResponseWrite&lt;/code&gt; appends the queued content to the output.&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Register Middleware
&lt;/h4&gt;

&lt;p&gt;In your "Program.cs":&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;UseResponseWrite&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Add this before app.Run()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Final HTML Output
&lt;/h4&gt;

&lt;p&gt;With ResponseWrite, the final HTML received by the browser will look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;ResponseWrite Demo&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Welcome to ResponseWrite Demo&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;This is content from the View.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
Hello from Elanat!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note: The &lt;code&gt;"Hello from Elanat!"&lt;/code&gt; text appears &lt;strong&gt;after the View HTML&lt;/strong&gt; because ResponseWrite appends the content at the end of the response before it is sent to the client.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Prevents response stream write timing issues&lt;/li&gt;
&lt;li&gt;Works across Razor Pages, MVC, and Minimal APIs&lt;/li&gt;
&lt;li&gt;Middleware-level solution (not View-level workaround)&lt;/li&gt;
&lt;li&gt;Zero dependencies&lt;/li&gt;
&lt;li&gt;Modular and plugin-friendly&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  WebForms Core Example
&lt;/h3&gt;

&lt;p&gt;This middleware is fully compatible with &lt;strong&gt;&lt;a href="https://github.com/webforms-core" rel="noopener noreferrer"&gt;WebForms Core&lt;/a&gt;&lt;/strong&gt;, a technology developed by &lt;a href="https://elanat.net" rel="noopener noreferrer"&gt;Elanat&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;IActionResult&lt;/span&gt; &lt;span class="nf"&gt;OnGet&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;WebForms&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;WebForms&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetBackgroundColor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"&amp;lt;body&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"violet"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="n"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ExportToHtmlComment&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;Page&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dotnet add package ResponseWrite
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.nuget.org/packages/ResponseWrite" rel="noopener noreferrer"&gt;NuGet Package →&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/elanatframework/Response_write" rel="noopener noreferrer"&gt;GitHub Source →&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you’re building modular systems, CMS platforms, or plugin-based architectures in ASP.NET Core, ResponseWrite might save you from fighting the response pipeline.&lt;/p&gt;

&lt;p&gt;If this solves a pain point for you, feel free to try it, open an issue, or contribute on GitHub.&lt;br&gt;
Feedback and architectural discussions are always welcome.&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>csharp</category>
      <category>architecture</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Loading a View Inside Another View in CodeBehind (SSR vs CSR)</title>
      <dc:creator>Elanat Framework</dc:creator>
      <pubDate>Mon, 23 Feb 2026 12:49:06 +0000</pubDate>
      <link>https://forem.com/elanatframework/loading-a-view-inside-another-view-in-codebehind-ssr-vs-csr-baf</link>
      <guid>https://forem.com/elanatframework/loading-a-view-inside-another-view-in-codebehind-ssr-vs-csr-baf</guid>
      <description>&lt;p&gt;In this tutorial, you will learn two different approaches to compose modular web pages using the CodeBehind framework: Server-Side Rendering (SSR) with LoadPage, and Client-Side Rendering (CSR) with &lt;a href="https://elanat.net/page_content/web_forms_core" rel="noopener noreferrer"&gt;WebForms Core&lt;/a&gt;."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Server-Side Rendering (SSR)&lt;/strong&gt; means the server fully generates the HTML before sending it to the browser.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Client-Side Rendering (CSR)&lt;/strong&gt; means part of the page is loaded or generated after the main page has already been delivered to the browser.&lt;/p&gt;

&lt;p&gt;In modern web development, it is often necessary to divide a web page into independent and modular parts so that each part can be managed according to the type of data, level of dynamism and need for customization.&lt;/p&gt;

&lt;p&gt;There are multiple ways to load one page inside another. However, not all approaches are optimal in terms of performance and scalability. In this article, we focus only on two recommended strategies. Here we will teach you two approaches, one of which is based on SSR and the other is CSR.&lt;/p&gt;

&lt;p&gt;Let's start with the server-side approach.&lt;/p&gt;

&lt;h1&gt;
  
  
  Load Page Example
&lt;/h1&gt;

&lt;p&gt;In this example, we create a simple user profile module that will later be injected into another page.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating the Module
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Module ("/module/user_profile.aspx")&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;@page
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"position: fixed; top: 10px; right: 10px; display: flex; align-items: center; gap: 10px;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;span&amp;gt;&lt;/span&gt;🔔&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://ui-avatars.com/api/?name=adriano"&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"width: 40px; height: 40px; border-radius: 50%;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;span&amp;gt;&lt;/span&gt;Adriano Armisen&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;span&amp;gt;&lt;/span&gt;▼&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Server-Side Rendering (SSR) with LoadPage
&lt;/h2&gt;

&lt;p&gt;In this case, in the View page, using the &lt;code&gt;LoadPage&lt;/code&gt; method, we can add the desired page to the desired section of the HTML page.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using LoadPage in the View&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;@page
&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"utf-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;CodeBehind Framework Call Page SSR Mode&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;

  @LoadPage("/module/user_profile.aspx")

  &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;CodeBehind Framework&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;CodeBehind Framework is a lightweight ASP.NET-based web framework that simplifies development by separating HTML structure from server-side logic without relying on MVC or Razor.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;How LoadPage Works?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When using &lt;code&gt;LoadPage&lt;/code&gt;, the server executes the requested page and injects its rendered HTML into the current page before sending the final output to the client.&lt;/p&gt;

&lt;h2&gt;
  
  
  When You Should Avoid SSR
&lt;/h2&gt;

&lt;p&gt;However, SSR is not always the best solution. In some scenarios, a different approach is more efficient.&lt;/p&gt;

&lt;p&gt;Consider a page where some users are logged in and some are using its features without registering. On many websites, a logged-in user sees a menu at the top of the page that is specific to their account, while the rest of the site is the same for all users.&lt;/p&gt;

&lt;p&gt;One bad decision in this scenario is to render this user-specific menu as SSR and send it to the user along with the entire HTML of the page. In this case, the server is forced to generate a different version of the HTML for each user. The result of this is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prevents full-page CDN caching&lt;/li&gt;
&lt;li&gt;Reduced effectiveness of server-side and client-side caching&lt;/li&gt;
&lt;li&gt;Increased processing pressure on the server&lt;/li&gt;
&lt;li&gt;Loss of scalability at high traffic&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Therefore, using SSR for user-specific content can negatively impact performance and caching strategy in high-traffic applications.&lt;/p&gt;

&lt;p&gt;While the main body of the page can be fully cacheable and shared by all users, only the login-specific part needs to be loaded separately.&lt;/p&gt;

&lt;p&gt;This is where AJAX comes into play;&lt;br&gt;
Instead of generating a completely customized HTML, you can send the main page as a public, cacheable page, and then retrieve and replace the user-dependent parts separately and dynamically.&lt;/p&gt;

&lt;p&gt;Of course, using AJAX increases the complexity of the architecture and state management on the client side to some extent. You have to define separate endpoints, manage login status, handle errors, and in some cases encounter problems such as UI synchronization or loading state.&lt;/p&gt;

&lt;p&gt;But fortunately, in the CodeBehind framework, you can use WebForms Core technology to add different parts of the page in a modular and independent way after loading the main page, without the need to directly implement AJAX.&lt;/p&gt;
&lt;h2&gt;
  
  
  Client-Side Rendering (CSR) with WebForms Core
&lt;/h2&gt;

&lt;p&gt;WebForms Core is a client-side execution layer in the CodeBehind framework that allows dynamic content injection after the initial page load.&lt;/p&gt;

&lt;p&gt;In this approach:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;First, the main body of the page is sent as a public, cacheable page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Then, the controls or components dependent on the user's state are processed separately and added to the output after the initial execution of the page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This process is done without the need to write manual AJAX code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;At the same time, the page structure remains discrete and scalable.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Example
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;@page
&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"utf-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;CodeBehind Framework Call Page CSR Mode&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"module"&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"/script/web-forms.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
@{
  WebForms form = new WebForms();
  form.AddTextToUp("&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;", Fetch.LoadUrl("/module/user_profile.aspx"));
}

@form.ExportToHtmlComment()

  &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;CodeBehind Framework&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;CodeBehind Framework is a lightweight ASP.NET-based web framework that simplifies development by separating HTML structure from server-side logic without relying on MVC or Razor.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Fetch.LoadUrl&lt;/code&gt; is not executed on the server. Instead, it generates instructions that tell the client to asynchronously retrieve the module page after the main page loads&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;AddTextToUp&lt;/code&gt; injects the loaded content to the top of the &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; element.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ExportToHtmlComment&lt;/code&gt; renders the required instructions for WebForms Core to process the dynamic content on the client side.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is recommended to implement client caching in CSR mode for the module page so that it is requested from the server only once.&lt;/p&gt;

&lt;p&gt;The output of both methods is the same for the end user, but CSR mode makes one more request to the server.&lt;/p&gt;

&lt;p&gt;CSR helps maintain full-page CDN caching while isolating user-specific components into independent requests.&lt;/p&gt;
&lt;h2&gt;
  
  
  Final Result
&lt;/h2&gt;

&lt;p&gt;The following screenshot shows the final rendered HTML in the browser for both approaches.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fml30pv7i8wyn7hoql6m4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fml30pv7i8wyn7hoql6m4.png" alt="CodeBehind Framework Call Page CSR and SSR Mode" width="652" height="151"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Comparison of CSR and SSR
&lt;/h2&gt;

&lt;p&gt;The following table summarizes the differences between SSR and CSR in CodeBehind:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;SSR&lt;/th&gt;
&lt;th&gt;CSR&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Rendering Location&lt;/td&gt;
&lt;td&gt;Server&lt;/td&gt;
&lt;td&gt;Client&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Extra HTTP Request&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CDN Friendly&lt;/td&gt;
&lt;td&gt;Limited for user-based content&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Complexity&lt;/td&gt;
&lt;td&gt;Low&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Best Use Case&lt;/td&gt;
&lt;td&gt;Shared content&lt;/td&gt;
&lt;td&gt;User-specific modules&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: This is only a demonstration of page composition. In real applications, always validate authentication and authorization on the server side, even when using CSR.&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;@page
@if (IsUser)
{
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"position: fixed; top: 10px; right: 10px; display: flex; align-items: center; gap: 10px;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;span&amp;gt;&lt;/span&gt;🔔&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://ui-avatars.com/api/?name=adriano"&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"width: 40px; height: 40px; border-radius: 50%;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;span&amp;gt;&lt;/span&gt;Adriano Armisen&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;span&amp;gt;&lt;/span&gt;▼&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In this article, we explored two approaches for composing modular pages in the CodeBehind framework. SSR using LoadPage is simple and efficient for static or shared content, while CSR using WebForms Core is more suitable for user-specific and dynamic components that should not affect page caching. Choosing the right strategy depends on performance requirements, scalability, and architecture design.&lt;/p&gt;

&lt;h2&gt;
  
  
  Related links
&lt;/h2&gt;

&lt;p&gt;CodeBehind on GitHub:&lt;br&gt;
&lt;a href="https://github.com/elanatframework/Code_behind" rel="noopener noreferrer"&gt;https://github.com/elanatframework/Code_behind&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;CodeBehind in NuGet:&lt;br&gt;
&lt;a href="https://www.nuget.org/packages/CodeBehind/" rel="noopener noreferrer"&gt;https://www.nuget.org/packages/CodeBehind/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;CodeBehind page:&lt;br&gt;
&lt;a href="https://elanat.net/page_content/code_behind" rel="noopener noreferrer"&gt;https://elanat.net/page_content/code_behind&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>dotnet</category>
      <category>beginners</category>
      <category>backend</category>
    </item>
    <item>
      <title>Performance Comparison: React vs WebForms Core</title>
      <dc:creator>Elanat Framework</dc:creator>
      <pubDate>Sat, 21 Feb 2026 22:11:34 +0000</pubDate>
      <link>https://forem.com/elanatframework/performance-comparison-react-vs-webforms-core-50ec</link>
      <guid>https://forem.com/elanatframework/performance-comparison-react-vs-webforms-core-50ec</guid>
      <description>&lt;h2&gt;
  
  
  Focus on Network Requests, Bandwidth Consumption, and Client Execution Model
&lt;/h2&gt;

&lt;p&gt;In modern web architectures, performance is not only about rendering speed. A critical factor is the &lt;strong&gt;communication pattern with the server and the volume of transferred data&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This article compares &lt;strong&gt;React&lt;/strong&gt; and &lt;strong&gt;&lt;a href="https://github.com/webforms-core" rel="noopener noreferrer"&gt;WebForms Core&lt;/a&gt; (WFC)&lt;/strong&gt; strictly from a performance and network perspective, focusing on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Initial request count&lt;/li&gt;
&lt;li&gt;Secondary request count&lt;/li&gt;
&lt;li&gt;Initial download size&lt;/li&gt;
&lt;li&gt;Bandwidth consumption during interactions&lt;/li&gt;
&lt;li&gt;Client execution model&lt;/li&gt;
&lt;li&gt;React’s need for build and JSX&lt;/li&gt;
&lt;li&gt;HTML structure handling in WFC&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is not a general pros/cons comparison — it is a technical, architectural performance analysis.&lt;/p&gt;




&lt;h1&gt;
  
  
  1️⃣ Initial Load Phase
&lt;/h1&gt;

&lt;h2&gt;
  
  
  React
&lt;/h2&gt;

&lt;p&gt;In a typical React application, the following occurs:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Download of JavaScript bundle (often hundreds of KB to multiple MBs)&lt;/li&gt;
&lt;li&gt;Download of React runtime&lt;/li&gt;
&lt;li&gt;Execution of hydration or mounting&lt;/li&gt;
&lt;li&gt;DOM generation through JavaScript&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Even in optimized projects:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One initial HTML request&lt;/li&gt;
&lt;li&gt;Multiple JS requests&lt;/li&gt;
&lt;li&gt;CSS and other assets&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As a result:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📦 Initial payload is usually larger&lt;/li&gt;
&lt;li&gt;🌐 Higher number of initial requests&lt;/li&gt;
&lt;li&gt;⚙ Initial rendering depends on JavaScript execution&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  WebForms Core
&lt;/h2&gt;

&lt;p&gt;In WFC:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A standard HTML page is sent from the server&lt;/li&gt;
&lt;li&gt;Optionally, a lightweight WebFormsJS file&lt;/li&gt;
&lt;li&gt;No heavy bundle&lt;/li&gt;
&lt;li&gt;No mandatory build pipeline&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the simplest case:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One HTML request&lt;/li&gt;
&lt;li&gt;One small JS request&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Result:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📦 Smaller initial payload&lt;/li&gt;
&lt;li&gt;🌐 Fewer initial requests&lt;/li&gt;
&lt;li&gt;⚙ Page contains usable HTML even before JS executes&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  2️⃣ User Interactions
&lt;/h1&gt;

&lt;p&gt;This is where architectural differences become more significant.&lt;/p&gt;




&lt;h2&gt;
  
  
  Scenario A: Pure Client-Side Interaction
&lt;/h2&gt;

&lt;h3&gt;
  
  
  WFC Example (KeyUp without server call)
&lt;/h3&gt;

&lt;p&gt;Server code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;PageLoad&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;HttpContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;       
    &lt;span class="n"&gt;WebForms&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;WebForms&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetCommentEvent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"TextBox1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;HtmlEvent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;OnKeyUp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"keyup"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;StartIndex&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"keyup"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetBackgroundColor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"TextBox1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Fetch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;GetValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"TextBox1"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

    &lt;span class="nf"&gt;Write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ExportToHtmlComment&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Server output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!--[web-forms]
EbTextBox1=onkeyup|keyup|
#=keyup
bcTextBox1=@$vTextBox1--&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"TextBox1"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this case:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No request is sent to the server&lt;/li&gt;
&lt;li&gt;WebFormsJS parses the comment&lt;/li&gt;
&lt;li&gt;The event is registered in the client&lt;/li&gt;
&lt;li&gt;DOM is updated directly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Execution model:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Event → Direct DOM manipulation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Requests: 0&lt;br&gt;
Secondary bandwidth: 0&lt;/p&gt;


&lt;h3&gt;
  
  
  React Equivalent
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;App&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setColor&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;input&lt;/span&gt;
      &lt;span class="na"&gt;onChange&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;setColor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;color&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Execution model:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Event → setState → Virtual DOM diff → Patch DOM
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Requests: 0&lt;br&gt;
Secondary bandwidth: 0&lt;/p&gt;

&lt;p&gt;However, internally React:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Maintains state&lt;/li&gt;
&lt;li&gt;Executes Virtual DOM diffing&lt;/li&gt;
&lt;li&gt;Triggers re-render cycles&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;WFC in this scenario:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automatic state with server state engine&lt;/li&gt;
&lt;li&gt;No diff algorithm&lt;/li&gt;
&lt;li&gt;Direct DOM update&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;From a CPU perspective in simple cases, WFC introduces less abstraction overhead.&lt;/p&gt;


&lt;h2&gt;
  
  
  Scenario B: Interaction with Server
&lt;/h2&gt;
&lt;h3&gt;
  
  
  React
&lt;/h3&gt;

&lt;p&gt;A typical form submission in React:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/api/contact&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Standard SPA pattern:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AJAX request&lt;/li&gt;
&lt;li&gt;JSON response&lt;/li&gt;
&lt;li&gt;State update&lt;/li&gt;
&lt;li&gt;Re-render&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In larger apps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multiple API endpoints&lt;/li&gt;
&lt;li&gt;Parallel requests&lt;/li&gt;
&lt;li&gt;Polling or WebSocket connections&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;React applications are generally API-driven, meaning frequent server communication.&lt;/p&gt;




&lt;h3&gt;
  
  
  WebForms Core
&lt;/h3&gt;

&lt;p&gt;WFC preserves the traditional form model:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;POST → server → INI response → DOM patch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The key distinction:&lt;/p&gt;

&lt;p&gt;The server does not return full HTML.&lt;br&gt;
It returns compact command instructions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[web-forms]
sd(button)=1
nt&amp;lt;form&amp;gt;=h3
bc&amp;lt;h3&amp;gt;=green
st&amp;lt;h3&amp;gt;=Message
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this case:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Only change instructions are sent&lt;/li&gt;
&lt;li&gt;No full HTML re-render&lt;/li&gt;
&lt;li&gt;No large JSON state tree&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bandwidth consumption is lower than full page reloads, and typically lighter than API-heavy SPA responses.&lt;/p&gt;




&lt;h1&gt;
  
  
  3️⃣ Request Patterns in Real Applications
&lt;/h1&gt;

&lt;h2&gt;
  
  
  React (SPA Model)
&lt;/h2&gt;

&lt;p&gt;Common behavior:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Large bundle downloaded once&lt;/li&gt;
&lt;li&gt;Then dozens or hundreds of API calls&lt;/li&gt;
&lt;li&gt;Fully dependent on backend APIs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Benefit: No full page reload&lt;br&gt;
Cost: Continuous API dependency&lt;/p&gt;




&lt;h2&gt;
  
  
  WebForms Core
&lt;/h2&gt;

&lt;p&gt;Two possible patterns:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Pure client-side interaction (no server calls)&lt;/li&gt;
&lt;li&gt;Lightweight roundtrip form-based interaction&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In many simple UI cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No server request is required&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In data-driven cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fewer calls than API-heavy SPAs&lt;/li&gt;
&lt;li&gt;Interaction is often form-based rather than endpoint-driven&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  4️⃣ Bandwidth Consumption
&lt;/h1&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Aspect&lt;/th&gt;
&lt;th&gt;React&lt;/th&gt;
&lt;th&gt;WebForms Core&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Initial download&lt;/td&gt;
&lt;td&gt;Large (bundle)&lt;/td&gt;
&lt;td&gt;Small&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Client-only interaction&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Server interaction&lt;/td&gt;
&lt;td&gt;JSON + state updates&lt;/td&gt;
&lt;td&gt;Compact instruction commands&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;API dependency&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Optional&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h1&gt;
  
  
  5️⃣ JSX and Build Requirement
&lt;/h1&gt;

&lt;h2&gt;
  
  
  React
&lt;/h2&gt;

&lt;p&gt;React is rarely used without a build process.&lt;/p&gt;

&lt;p&gt;Why?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JSX must be transpiled&lt;/li&gt;
&lt;li&gt;Modules must be bundled&lt;/li&gt;
&lt;li&gt;Optimizations must be applied&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In React:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HTML is written inside JavaScript&lt;/li&gt;
&lt;li&gt;UI structure depends on runtime&lt;/li&gt;
&lt;li&gt;Without JS, nothing renders&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  WebForms Core
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;HTML remains standard&lt;/li&gt;
&lt;li&gt;No JSX&lt;/li&gt;
&lt;li&gt;No mandatory build step&lt;/li&gt;
&lt;li&gt;View is independent and inspectable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Server logic remains separate from HTML markup.&lt;/p&gt;




&lt;h1&gt;
  
  
  6️⃣ Development Model Perspective
&lt;/h1&gt;

&lt;p&gt;React:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;UI = function(state)&lt;/li&gt;
&lt;li&gt;State-driven&lt;/li&gt;
&lt;li&gt;Re-render-driven&lt;/li&gt;
&lt;li&gt;Data-centric architecture&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;WebForms Core:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;UI = HTML&lt;/li&gt;
&lt;li&gt;Behavior = commands&lt;/li&gt;
&lt;li&gt;Event-driven&lt;/li&gt;
&lt;li&gt;Command-based execution&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  7️⃣ Final Technical Summary
&lt;/h1&gt;

&lt;p&gt;If the evaluation focuses strictly on network and bandwidth:&lt;/p&gt;

&lt;h3&gt;
  
  
  React
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Larger initial payload&lt;/li&gt;
&lt;li&gt;API-heavy interaction model&lt;/li&gt;
&lt;li&gt;Client-side state engine&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  WebForms Core
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Smaller initial payload&lt;/li&gt;
&lt;li&gt;Ability to operate without server calls&lt;/li&gt;
&lt;li&gt;Compact instruction-based server responses&lt;/li&gt;
&lt;li&gt;No diff engine required&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Summary of Network &amp;amp; Structural Behavior&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fha0l4vkmrlqxm8sugr2s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fha0l4vkmrlqxm8sugr2s.png" alt="React and WebForms Core Performance Comparison" width="800" height="584"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;React represents a full SPA architecture with a client-side state engine, requiring bundling, build pipelines, and extensive API usage.&lt;/p&gt;

&lt;p&gt;WebForms Core represents a hybrid model that can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Operate fully client-side&lt;/li&gt;
&lt;li&gt;Or communicate with minimal bandwidth using compact command instructions&lt;/li&gt;
&lt;li&gt;Avoid complex client state engines&lt;/li&gt;
&lt;li&gt;Eliminate mandatory build pipelines&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;From a network and bandwidth perspective:&lt;/p&gt;

&lt;p&gt;WebForms Core tends to be lighter in traditional, form-centric applications.&lt;br&gt;
React provides stronger data-flow control in large, API-driven applications.&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>performance</category>
      <category>react</category>
      <category>webformscore</category>
    </item>
    <item>
      <title>Modular Structure in CodeBehind</title>
      <dc:creator>Elanat Framework</dc:creator>
      <pubDate>Fri, 20 Feb 2026 23:30:28 +0000</pubDate>
      <link>https://forem.com/elanatframework/modular-structure-in-codebehind-31aa</link>
      <guid>https://forem.com/elanatframework/modular-structure-in-codebehind-31aa</guid>
      <description>&lt;h2&gt;
  
  
  What is CodeBehind?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/elanatframework/Code_behind" rel="noopener noreferrer"&gt;CodeBehind&lt;/a&gt;&lt;/strong&gt; is a powerful backend framework built upon years of experience and research on &lt;strong&gt;ASP.NET WebForms&lt;/strong&gt; from Microsoft. This framework, developed by &lt;strong&gt;&lt;a href="https://elanat.net" rel="noopener noreferrer"&gt;Elanat&lt;/a&gt;&lt;/strong&gt;, is designed for the latest .NET versions (currently .NET 10).&lt;/p&gt;




&lt;h2&gt;
  
  
  CodeBehind’s Modular Structure
&lt;/h2&gt;

&lt;p&gt;By default, CodeBehind provides a revolutionary &lt;strong&gt;modular structure&lt;/strong&gt;. In this structure, you can &lt;strong&gt;copy and paste an ASPX file along with its compiled DLL from another project into a live web system&lt;/strong&gt; without needing to rebuild or republish the entire project.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fng3q4tom6n8l799m7onp.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fng3q4tom6n8l799m7onp.jpg" alt="Modular Structure in .NET" width="800" height="1200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This capability gives developers a &lt;strong&gt;vanilla PHP–like experience&lt;/strong&gt; in a compiled .NET environment: lightweight, flexible, and fast. Essentially, &lt;strong&gt;any project built with CodeBehind is inherently modular&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  How to Create a New Module
&lt;/h2&gt;

&lt;p&gt;As mentioned, you can copy either an ASPX file or a DLL. Here’s how to handle these two scenarios separately.&lt;/p&gt;




&lt;h3&gt;
  
  
  Example 1: View Only
&lt;/h3&gt;

&lt;p&gt;In &lt;strong&gt;WebForms Core&lt;/strong&gt;, you can have a &lt;strong&gt;View without a controller&lt;/strong&gt;. This means a single ASPX file can itself be a module.&lt;/p&gt;

&lt;p&gt;Here’s a simple ASPX view that generates random numbers:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;random.aspx&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;@page&lt;/span&gt;
&lt;span class="n"&gt;@layout&lt;/span&gt; &lt;span class="s"&gt;"/layout.aspx"&lt;/span&gt;
&lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Generate a random number between 1 and 100&lt;/span&gt;
    &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;rnd&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;Random&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;rnd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Next&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;101&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// Generate a message based on the number&lt;/span&gt;
    &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="m"&gt;50&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="s"&gt;"The number is big!"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"The number is small!"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;h2&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;Random&lt;/span&gt; &lt;span class="n"&gt;Number&lt;/span&gt; &lt;span class="n"&gt;Generator&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;CodeBehind&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;h2&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;Your&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;strong&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;@number&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;strong&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;Message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;em&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;@message&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;em&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;ul&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nf"&gt;@for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;++)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;li&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;Another&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;@rnd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Next&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;101&lt;/span&gt;&lt;span class="p"&gt;)&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;li&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;ul&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="n"&gt;style&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"color: green;"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;Here&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;list&lt;/span&gt; &lt;span class="n"&gt;of&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt; &lt;span class="n"&gt;more&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt; &lt;span class="n"&gt;numbers&lt;/span&gt;&lt;span class="p"&gt;.&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Place the &lt;strong&gt;View file&lt;/strong&gt; anywhere in the &lt;code&gt;wwwroot&lt;/code&gt; directory (this path is configurable).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ Note: To add a module (in this case, a View), you need a mechanism to trigger the compilation step:&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;SetCodeBehind&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;CodeBehindCompiler&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ReCompile&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can, for example, create a &lt;strong&gt;View management page&lt;/strong&gt; where you upload new Views and then call the code above after a successful upload.&lt;/p&gt;




&lt;h3&gt;
  
  
  Example 2: DLL Module
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Steps to create a module project:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Create a new empty ASP.NET Core project in Visual Studio Code (targeting .NET 10.0).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Install the latest &lt;strong&gt;CodeBehind framework&lt;/strong&gt; via NuGet packages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Configure the &lt;code&gt;Program.cs&lt;/code&gt; class:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;builder&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;WebApplication&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;CreateBuilder&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Build&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Run&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Create a &lt;code&gt;Default.aspx&lt;/code&gt; file under &lt;code&gt;wwwroot/about&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;@page&lt;/span&gt;
&lt;span class="n"&gt;@layout&lt;/span&gt; &lt;span class="s"&gt;"/layout.aspx"&lt;/span&gt;
&lt;span class="n"&gt;@controller&lt;/span&gt; &lt;span class="n"&gt;ModuleProject&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AboutController&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="n"&gt;An&lt;/span&gt; &lt;span class="s"&gt;"About Us"&lt;/span&gt; &lt;span class="n"&gt;page&lt;/span&gt; &lt;span class="n"&gt;provides&lt;/span&gt; &lt;span class="n"&gt;information&lt;/span&gt; &lt;span class="n"&gt;about&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;company&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;organization&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;or&lt;/span&gt; &lt;span class="n"&gt;individual&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; 
    &lt;span class="n"&gt;It&lt;/span&gt; &lt;span class="n"&gt;tells&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;brand&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="n"&gt;story&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;shares&lt;/span&gt; &lt;span class="n"&gt;its&lt;/span&gt; &lt;span class="n"&gt;vision&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;history&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;and&lt;/span&gt; &lt;span class="n"&gt;values&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;introduces&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;team&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
    &lt;span class="k"&gt;and&lt;/span&gt; &lt;span class="n"&gt;builds&lt;/span&gt; &lt;span class="n"&gt;trust&lt;/span&gt; &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; Add a controller class:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;CodeBehind&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;namespace&lt;/span&gt; &lt;span class="nn"&gt;ModuleProject&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;partial&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;AboutController&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;CodeBehindController&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;PageLoad&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;HttpContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;ViewData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"About page"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 6:&lt;/strong&gt; Publish the project.&lt;/p&gt;




&lt;p&gt;Now, to deploy the module:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Copy the &lt;code&gt;Default.aspx&lt;/code&gt; file to &lt;code&gt;wwwroot/about&lt;/code&gt; in the live project.&lt;/li&gt;
&lt;li&gt;Copy the compiled &lt;strong&gt;DLL&lt;/strong&gt; from the module project into &lt;code&gt;wwwroot/bin&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Trigger the compilation mechanism:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;SetCodeBehind&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;CodeBehindCompiler&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ReCompile&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After this, your new module is fully active and integrated into the live system without rebuilding the main project.&lt;/p&gt;




&lt;p&gt;This structure demonstrates the &lt;strong&gt;true modularity of CodeBehind&lt;/strong&gt;: independent Views and DLLs can be added dynamically, making development fast, flexible, and very close to a “vanilla PHP” experience in a fully compiled .NET environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Related links
&lt;/h2&gt;

&lt;p&gt;CodeBehind on GitHub:&lt;br&gt;
&lt;a href="https://github.com/elanatframework/Code_behind" rel="noopener noreferrer"&gt;https://github.com/elanatframework/Code_behind&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;CodeBehind in NuGet:&lt;br&gt;
&lt;a href="https://www.nuget.org/packages/CodeBehind/" rel="noopener noreferrer"&gt;https://www.nuget.org/packages/CodeBehind/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;CodeBehind page:&lt;br&gt;
&lt;a href="https://elanat.net/page_content/code_behind" rel="noopener noreferrer"&gt;https://elanat.net/page_content/code_behind&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>dotnet</category>
      <category>beginners</category>
      <category>backend</category>
    </item>
    <item>
      <title>Everything Automated: No Client Routing, No Manual Mapping, No Frontend State Management, No Build Pipeline, No Separate UI API</title>
      <dc:creator>Elanat Framework</dc:creator>
      <pubDate>Wed, 18 Feb 2026 20:59:45 +0000</pubDate>
      <link>https://forem.com/elanatframework/everything-automated-no-client-routing-no-manual-mapping-no-frontend-state-management-no-build-4emk</link>
      <guid>https://forem.com/elanatframework/everything-automated-no-client-routing-no-manual-mapping-no-frontend-state-management-no-build-4emk</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;a href="https://elanat.net/page_content/web_forms_core" rel="noopener noreferrer"&gt;WebForms Core&lt;/a&gt;&lt;/strong&gt;, introduced to the web world in 2024 by the &lt;a href="https://elanat.net" rel="noopener noreferrer"&gt;Elanat&lt;/a&gt; development team, is a structured response to the growing crisis of &lt;em&gt;frontend complexity&lt;/em&gt; and &lt;em&gt;JavaScript fatigue&lt;/em&gt; that has challenged the developer community in recent years. WebForms Core is a server-command–driven UI automation framework that minimizes client-side logic while preserving dynamic interactivity.&lt;/p&gt;

&lt;p&gt;While mainstream web development paradigms have shifted toward moving all processing, state management, and rendering responsibilities to the browser, WebForms Core introduces a strategic shift through the &lt;strong&gt;Commander–Executor model&lt;/strong&gt;, where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;server&lt;/strong&gt; acts as the centralized decision-making core.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;client&lt;/strong&gt; is responsible only for executing commands.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsg9b5cnbhan32hb3bx7o.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsg9b5cnbhan32hb3bx7o.jpg" alt="WebForms Core" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The fundamental objective of this technology is to eliminate the need for manual frontend coding, automate data serialization, intelligently manage events, and ultimately simplify development to the point where mastery of server-side languages alone enables the creation of highly dynamic and complex user interfaces.&lt;/p&gt;




&lt;h1&gt;
  
  
  Philosophical Foundations and the Necessity of WebForms Core in the Modern Ecosystem
&lt;/h1&gt;

&lt;p&gt;The evolution of the web from static pages to Single Page Applications (SPAs) led to the emergence of heavyweight frameworks such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;React&lt;/li&gt;
&lt;li&gt;Angular&lt;/li&gt;
&lt;li&gt;Vue.js&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;However, this evolution came at significant cost:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Increased JavaScript bundle sizes&lt;/li&gt;
&lt;li&gt;Complex state management (Redux, Vuex, Context API)&lt;/li&gt;
&lt;li&gt;SEO challenges&lt;/li&gt;
&lt;li&gt;Separation of frontend and backend teams&lt;/li&gt;
&lt;li&gt;Growing developer burnout from constant context switching&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;WebForms Core proposes a model in which &lt;strong&gt;automation is not a feature — it is the backbone of the system&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In this architecture:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;WebFormsJS&lt;/strong&gt; acts as a lightweight interpreter in the client.&lt;/li&gt;
&lt;li&gt;It automatically converts server-issued commands into DOM changes.&lt;/li&gt;
&lt;li&gt;No manual DOM diffing, mapping, or JavaScript orchestration is required.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Conceptually inspired by Microsoft ASP.NET Web Forms, WebForms Core eliminates its historical weaknesses such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Heavy ViewState&lt;/li&gt;
&lt;li&gt;Platform dependency&lt;/li&gt;
&lt;li&gt;Lack of HTML control&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;WebForms Core is a &lt;strong&gt;bidirectional protocol&lt;/strong&gt; where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Heavy execution occurs client-side via WebFormsJS.&lt;/li&gt;
&lt;li&gt;Control logic is issued as &lt;strong&gt;Action Control commands&lt;/strong&gt; from the server.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Developers are freed from:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Manual AJAX implementation&lt;/li&gt;
&lt;li&gt;DOM event wiring&lt;/li&gt;
&lt;li&gt;Server-client synchronization management&lt;/li&gt;
&lt;li&gt;Building and maintaining separate REST/GraphQL APIs for UI interactions&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Architectural Comparison
&lt;/h1&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Modern SPA Frameworks&lt;/th&gt;
&lt;th&gt;WebForms Core&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Decision Authority&lt;/td&gt;
&lt;td&gt;Client (JS logic)&lt;/td&gt;
&lt;td&gt;Server (central business logic)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Core Library Size&lt;/td&gt;
&lt;td&gt;200–500 KB&lt;/td&gt;
&lt;td&gt;40–110 KB (WebFormsJS)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;State Management&lt;/td&gt;
&lt;td&gt;Manual (Redux, Vuex, Context API)&lt;/td&gt;
&lt;td&gt;Automatic (Stateless relative to DOM)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UI Update Mechanism&lt;/td&gt;
&lt;td&gt;Virtual DOM diffing&lt;/td&gt;
&lt;td&gt;Direct Action Control execution&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data Serialization&lt;/td&gt;
&lt;td&gt;Manual (JSON.stringify / Fetch API)&lt;/td&gt;
&lt;td&gt;Automatic based on form type and content&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SEO&lt;/td&gt;
&lt;td&gt;Requires SSR / prerendering&lt;/td&gt;
&lt;td&gt;Natively SEO-friendly (HTML-first)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Development Complexity&lt;/td&gt;
&lt;td&gt;High (multiple layers)&lt;/td&gt;
&lt;td&gt;Very Low (server-centric development)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h1&gt;
  
  
  Action Controls Architecture: The Automated Language of Server–Client Interaction
&lt;/h1&gt;

&lt;p&gt;The heart of automation in WebForms Core is the &lt;strong&gt;Action Controls protocol&lt;/strong&gt;, designed in a lightweight INI-based format to minimize bandwidth consumption.&lt;/p&gt;

&lt;p&gt;Instead of returning:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Entire HTML pages&lt;/li&gt;
&lt;li&gt;Or large JSON payloads that require client-side interpretation and mapping&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The server sends compact command blocks under the &lt;code&gt;[web-forms]&lt;/code&gt; header.&lt;/p&gt;

&lt;p&gt;Each line represents a direct operational instruction automatically executed by WebFormsJS.&lt;/p&gt;

&lt;p&gt;An Action Control consists of:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Operational code (first two characters)&lt;/li&gt;
&lt;li&gt;Tag definition (target identification)&lt;/li&gt;
&lt;li&gt;Target value&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;st&lt;/code&gt; → Set Text&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;bc&lt;/code&gt; → Background Color&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;The protocol is transport-agnostic (HTTP, WebSocket, SSE)&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h1&gt;
  
  
  Automatic Tag Identification System
&lt;/h1&gt;

&lt;p&gt;WebForms Core eliminates the need for &lt;code&gt;querySelector&lt;/code&gt; or JavaScript DOM lookups through a flexible text-based pattern system.&lt;/p&gt;

&lt;p&gt;Elements can be targeted via:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ID&lt;/strong&gt; – Simply by mentioning the ID name&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Name&lt;/strong&gt; – Using parentheses like &lt;code&gt;(name)&lt;/code&gt;. If a number follows, the corresponding index is selected&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tag Name&lt;/strong&gt; – Using angle brackets like &lt;code&gt;&amp;lt;tag&amp;gt;&lt;/code&gt;. This also supports indexing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Class Name&lt;/strong&gt; – Using curly braces like &lt;code&gt;{class}&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CSS Query&lt;/strong&gt; – Using the asterisk &lt;code&gt;*&lt;/code&gt; followed by a query string&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reference targeting (&lt;code&gt;-&lt;/code&gt;)&lt;/strong&gt; – The dash character refers to the last identified tag, dramatically reducing server response size&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Server-side examples:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"myId"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Hello"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetBackgroundColor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"&amp;lt;form&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"red"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No frontend code required. All UI changes are managed through simple server-side method calls.&lt;/p&gt;




&lt;h1&gt;
  
  
  Automated Request–Response Lifecycle
&lt;/h1&gt;

&lt;p&gt;In traditional frameworks, developers must:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Listen for &lt;code&gt;submit&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Call &lt;code&gt;preventDefault&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Manually collect data&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;fetch&lt;/code&gt; with proper error handling&lt;/li&gt;
&lt;li&gt;Manage loading states&lt;/li&gt;
&lt;li&gt;Handle responses and update UI accordingly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In WebForms Core, this chain is fully automated:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simply adding &lt;code&gt;web-forms.js&lt;/code&gt; to the page header automatically:

&lt;ul&gt;
&lt;li&gt;Injects PostBack logic into submit inputs&lt;/li&gt;
&lt;li&gt;Injects GetBack logic into &lt;code&gt;&amp;lt;a target="_self"&amp;gt;&lt;/code&gt; tags&lt;/li&gt;
&lt;li&gt;Handles all data collection and submission&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Lifecycle Stage&lt;/th&gt;
&lt;th&gt;WebForms Core Automatic Action&lt;/th&gt;
&lt;th&gt;Developer Role&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Event Identification&lt;/td&gt;
&lt;td&gt;Automatic PostBack/GetBack injection into submit buttons and &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; tags&lt;/td&gt;
&lt;td&gt;Standard HTML design&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data Collection&lt;/td&gt;
&lt;td&gt;Automatic serialization; Multipart detection for file uploads&lt;/td&gt;
&lt;td&gt;Define Input tags with proper Name attributes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Request Differentiation&lt;/td&gt;
&lt;td&gt;Automatic addition of &lt;code&gt;Post-Back: true&lt;/code&gt; header for server-side identification&lt;/td&gt;
&lt;td&gt;Check for Post-Back header&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Response Processing&lt;/td&gt;
&lt;td&gt;Automatic interpretation of Action Controls and DOM updates&lt;/td&gt;
&lt;td&gt;Call WebForms class methods on the server&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Navigation Management&lt;/td&gt;
&lt;td&gt;Uses Service Worker and routeAlias for partial page updates&lt;/td&gt;
&lt;td&gt;Build pages and manage routes on the server&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h1&gt;
  
  
  Intelligent Serialization &amp;amp; Smart Form Submissions (v2.0)
&lt;/h1&gt;

&lt;p&gt;WebForms Core automatically handles data serialization based on content type:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automatically detects multipart forms (file uploads → FormData)&lt;/li&gt;
&lt;li&gt;Encodes standard forms as URL-encoded strings automatically&lt;/li&gt;
&lt;li&gt;Adds a custom &lt;code&gt;Post-Back: true&lt;/code&gt; header to all interactive requests&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In version 2.0, this automation reaches a new level with &lt;strong&gt;Smart Form Submissions&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The client monitors changes using checksums (Checksums)&lt;/li&gt;
&lt;li&gt;Only fields that have actually been modified are sent to the server&lt;/li&gt;
&lt;li&gt;Unchanged fields are excluded from the request&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dramatically reduced bandwidth consumption&lt;/li&gt;
&lt;li&gt;Reduced server validation load for unchanged data&lt;/li&gt;
&lt;li&gt;Significantly improved performance, especially in forms with many fields&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Practical Comparative Examples
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Example 1: Rendering 196 Countries in a Dropdown
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;In React:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a backend API endpoint returning JSON data&lt;/li&gt;
&lt;li&gt;Write JavaScript to fetch data with &lt;code&gt;useEffect&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Manage loading, error, and success states&lt;/li&gt;
&lt;li&gt;Iterate through the data with &lt;code&gt;.map()&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Manually construct &lt;code&gt;&amp;lt;option&amp;gt;&lt;/code&gt; elements&lt;/li&gt;
&lt;li&gt;Render to DOM&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;In WebForms Core:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Server-side loop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;foreach&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;country&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;countryList&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;AddOptionTag&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"country"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;country&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;country&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Server automatically generates compact Action Control commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[web-forms]
aocountry=1|USA
aocountry=2|Italy
aocountry=3|France
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;WebFormsJS on the client automatically receives these commands and inserts the elements into the appropriate tag.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Result:&lt;/strong&gt; No client-side loop, no fetch calls, no state management, and complete elimination of frontend "code clutter." A backend developer can manage complex UIs without frontend expertise.&lt;/p&gt;




&lt;h3&gt;
  
  
  Example 2: Dynamic Style and Element State Changes
&lt;/h3&gt;

&lt;p&gt;Consider a scenario where, after a button click, you need to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Change the form's background color&lt;/li&gt;
&lt;li&gt;Display a success message to the user&lt;/li&gt;
&lt;li&gt;Disable the button&lt;/li&gt;
&lt;li&gt;Automatically remove the message after 3 seconds&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;In WebForms Core, this is accomplished with a few lines of server-side code:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;WebForms&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;WebForms&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetBackgroundColor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"&amp;lt;form&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"green"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;AddTag&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"&amp;lt;form&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"h3"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"&amp;lt;h3&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt; &lt;span class="s"&gt;"! Your message was successfully sent."&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetDisabled&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"(button)"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Delete&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"&amp;lt;h3&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;AssignDelay&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nf"&gt;Write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;WebForms Core automatically packages these commands into INI format (&lt;code&gt;bc&amp;lt;form&amp;gt;=green&lt;/code&gt;, &lt;code&gt;st&amp;lt;h3&amp;gt;=...&lt;/code&gt;, &lt;code&gt;sd(button)=1&lt;/code&gt;) and executes them on the client. The &lt;code&gt;AssignDelay&lt;/code&gt; method automatically creates a timing delay for the previous command (deleting the message) without requiring &lt;code&gt;setTimeout&lt;/code&gt; in JavaScript.&lt;/p&gt;




&lt;h1&gt;
  
  
  Stateless Commander–Executor Architecture
&lt;/h1&gt;

&lt;p&gt;Unlike server-side models such as Blazor Server, which maintain a server memory circuit of the client DOM, WebForms Core:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Stores &lt;strong&gt;no&lt;/strong&gt; client DOM snapshot in server memory&lt;/li&gt;
&lt;li&gt;Performs &lt;strong&gt;no&lt;/strong&gt; diff calculations&lt;/li&gt;
&lt;li&gt;Maintains &lt;strong&gt;no&lt;/strong&gt; per-user UI state&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It follows a precise model: &lt;strong&gt;Stateless relative to the DOM&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conceptual Distinction
&lt;/h3&gt;

&lt;p&gt;In this architecture:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;UI State remains in the browser&lt;/strong&gt; – All visual states like input values, menu open/closed status, elements added to DOM, and applied style changes stay on the client.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The server holds no copy of the client's DOM&lt;/strong&gt; – Unlike architectures that maintain a "Shadow DOM" or "Circuit" for interactive server-side rendering.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Each request is processed independently&lt;/strong&gt; – The server has no knowledge of the client's current state and doesn't need it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The server only issues commands&lt;/strong&gt; – Rather than sending data that the client must interpret, the server directly says: "Make tag X green."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This imperative command flow means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Server memory consumption is independent of the number of online users&lt;/li&gt;
&lt;li&gt;No need for server-side diff calculations between DOM versions&lt;/li&gt;
&lt;li&gt;Each response contains only new execution commands&lt;/li&gt;
&lt;li&gt;Near-zero latency and massive scalability&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Result:&lt;/strong&gt; Minimal client-side processing latency, massive scalability, and memory usage completely independent of concurrent user count.&lt;/p&gt;




&lt;h1&gt;
  
  
  Transient DOM Concept
&lt;/h1&gt;

&lt;p&gt;WebForms Core introduces &lt;strong&gt;Transient DOM&lt;/strong&gt;, an intelligent evolution of the Virtual DOM concept:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multiple server-side DOM changes are batched together&lt;/li&gt;
&lt;li&gt;Sent to the client in a single transaction&lt;/li&gt;
&lt;li&gt;Applied all at once to the real DOM by WebFormsJS&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of communicating with the client after each change or forcing the client to re-render at every step, WebForms Core packages all modifications into a unified transaction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Benefits:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No visual flicker during updates&lt;/li&gt;
&lt;li&gt;Dramatically faster UI response time&lt;/li&gt;
&lt;li&gt;Significantly reduced client workload&lt;/li&gt;
&lt;li&gt;Elimination of intermediate rendering layers&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Automation in Advanced Event Management and Synchronization
&lt;/h1&gt;

&lt;p&gt;In traditional web development, going beyond standard HTML events (like click) requires writing custom JavaScript libraries. WebForms Core 2.0 eliminates this limitation by allowing developers to define new DOM events on the server side. These events are seamlessly attached to client elements and are recognized as first-class browser events.&lt;/p&gt;

&lt;p&gt;Additionally, the &lt;code&gt;TriggerEvent&lt;/code&gt; method allows the server to automatically execute any event on the client. For example, after completing a heavy server-side process, the server can automatically trigger the &lt;code&gt;submit&lt;/code&gt; event of another form or the &lt;code&gt;click&lt;/code&gt; event of a hidden button in the user's browser.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This transforms the server from a mere responder into an active orchestrator of the user interface.&lt;/strong&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  Automatic External Data Fetching (Fetch Helper Class v2.0)
&lt;/h1&gt;

&lt;p&gt;Version 2.0 introduces a revolutionary &lt;strong&gt;Fetch helper class&lt;/strong&gt; that completely automates data extraction from external sources. This feature allows developers to command the client to retrieve data from an external API and display it in the UI without writing a single line of JavaScript.&lt;/p&gt;

&lt;h3&gt;
  
  
  Automatic Data Extraction Methods
&lt;/h3&gt;

&lt;p&gt;WebForms Core supports various data formats, each suited to specific scenarios:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Data Type&lt;/th&gt;
&lt;th&gt;Method&lt;/th&gt;
&lt;th&gt;Typical Use Case&lt;/th&gt;
&lt;th&gt;Automation Advantage&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;JSON&lt;/td&gt;
&lt;td&gt;&lt;code&gt;LoadJSON(url, path)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;REST/GraphQL APIs&lt;/td&gt;
&lt;td&gt;Supports XPath-like pathing for nested nodes (e.g., &lt;code&gt;user.profile.name&lt;/code&gt;); eliminates client-side Async/Await&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;XML&lt;/td&gt;
&lt;td&gt;&lt;code&gt;LoadXML(url, xpath)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;RSS feeds, sitemaps, structured reports&lt;/td&gt;
&lt;td&gt;Precise element extraction using full XPath standard&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;INI&lt;/td&gt;
&lt;td&gt;&lt;code&gt;LoadINI(url, key)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Language files, module settings&lt;/td&gt;
&lt;td&gt;Implement multi-language systems with a few lines of server code; no heavy i18n libraries needed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Plain Text&lt;/td&gt;
&lt;td&gt;&lt;code&gt;LoadLine(url, line)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Log files, line-based reports&lt;/td&gt;
&lt;td&gt;Direct access to specific text lines without parsing entire files&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Process:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The server issues the command&lt;/li&gt;
&lt;li&gt;The client performs the "fetch" and "processing" locally&lt;/li&gt;
&lt;li&gt;The server is not burdened with the bandwidth of receiving data from third-party APIs&lt;/li&gt;
&lt;li&gt;The server only orchestrates the operation&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This eliminates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Async/Await complexity in frontend code&lt;/li&gt;
&lt;li&gt;Manual fetch logic and error handling&lt;/li&gt;
&lt;li&gt;Heavy third-party client-side libraries&lt;/li&gt;
&lt;li&gt;State management for external data&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Automatic Modular Routing with CodeBehind
&lt;/h1&gt;

&lt;p&gt;When combined with Elanat's CodeBehind framework, WebForms Core creates a completely automated ecosystem for routing and controller management:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No manual routing tables&lt;/strong&gt; – The system automatically maps &lt;code&gt;.aspx&lt;/code&gt; file structures to web routes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Controllers auto-detected&lt;/strong&gt; – No need to register controllers manually&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Modules auto-registered&lt;/strong&gt; – Simply copy module files to the appropriate path&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When a developer wants to add a new section (module) to a website, they only need to copy the relevant files to the specified directory. The framework automatically detects the corresponding controller and establishes WebForms Core communications.&lt;/p&gt;

&lt;p&gt;This &lt;strong&gt;automatic modularity&lt;/strong&gt; is one of the greatest advantages of this technology for large enterprise projects where continuous changes and adding new features are routine operations.&lt;/p&gt;




&lt;h1&gt;
  
  
  Advanced UI Automation Examples
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Scenario 1: File Upload with Automatic Preview
&lt;/h3&gt;

&lt;p&gt;In a traditional system, AJAX file upload with simultaneous preview requires managing &lt;code&gt;FileReader&lt;/code&gt; in JavaScript and manual submission handling.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In WebForms Core, the server code is remarkably simple:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;WebForms&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;WebForms&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;AddTag&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"&amp;lt;form&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"h3"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;AddText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"&amp;lt;h3&amp;gt;-1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"File successfully uploaded."&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;AddTag&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"&amp;lt;form&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"img"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetAttribute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"&amp;lt;form&amp;gt;|&amp;lt;img&amp;gt;-1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"src"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;FilePath&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetWidth&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"&amp;lt;form&amp;gt;|&amp;lt;img&amp;gt;-1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;400&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nf"&gt;Write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, WebForms Core automatically creates the &lt;code&gt;img&lt;/code&gt; tag, sets its &lt;code&gt;src&lt;/code&gt; attribute, and adjusts its width—all without writing a single line of client-side code.&lt;/p&gt;

&lt;h3&gt;
  
  
  Scenario 2: Hierarchical Dropdown Menu Module
&lt;/h3&gt;

&lt;p&gt;Creating a tree menu that loads from the server typically requires receiving JSON data and rebuilding the DOM structure on the client.&lt;/p&gt;

&lt;p&gt;WebForms Core automates this process by calling a tree menu module using the &lt;code&gt;LoadModule&lt;/code&gt; method and the module's specialized functions (such as &lt;code&gt;ddm_AddItem&lt;/code&gt; and &lt;code&gt;ddm_Render&lt;/code&gt;). The server sends only the menu structure with simple commands, and the system automatically injects the resulting HTML output into the appropriate location (e.g., a tag with a specific ID).&lt;/p&gt;




&lt;h1&gt;
  
  
  Automated Security and Data Protection
&lt;/h1&gt;

&lt;p&gt;Automation in WebForms Core extends beyond UI to cover security aspects:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;All business logic remains server-side&lt;/strong&gt; – The client receives only execution commands&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero risk of sensitive code exposure&lt;/strong&gt; – Unlike SPAs where business logic often leaks into JavaScript bundles&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Native server-side validation support&lt;/strong&gt; – All validations execute on the server&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resistance to session management attacks&lt;/strong&gt; – Due to the stateless nature of the architecture&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In version 2.0, a native &lt;strong&gt;Unit Testing system&lt;/strong&gt; is introduced that allows automatically testing the correctness of Action Control execution and DOM changes on the server side. This guarantees UI stability without requiring complex frontend testing tools like Selenium or Cypress.&lt;/p&gt;




&lt;h1&gt;
  
  
  Real-Time Automation (WebSockets &amp;amp; SSE) with Intelligent Caching
&lt;/h1&gt;

&lt;p&gt;WebForms Core natively manages real-time interactions through built-in support for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;WebSocket&lt;/strong&gt; – Full-duplex communication channels&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Server-Sent Events (SSE)&lt;/strong&gt; – One-way server-to-client streaming&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The server can &lt;strong&gt;push&lt;/strong&gt; Action Control commands to the browser without any client request. This enables:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Live dashboards that update in real-time&lt;/li&gt;
&lt;li&gt;Chat systems with automatic message display&lt;/li&gt;
&lt;li&gt;Online monitoring tools with instant alerts&lt;/li&gt;
&lt;li&gt;Collaborative applications with synchronized UI states&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All without manual connection handling on the client side.&lt;/p&gt;

&lt;h3&gt;
  
  
  Intelligent Caching (v2.0)
&lt;/h3&gt;

&lt;p&gt;Version 2.0 introduces an intelligent caching system that automatically stores Action Control outputs for similar requests. This automation at the storage layer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dramatically reduces database and CPU load on the server&lt;/li&gt;
&lt;li&gt;Decreases response times to milliseconds&lt;/li&gt;
&lt;li&gt;Eliminates redundant processing of identical command sequences&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Performance Benchmarks and Automation Metrics
&lt;/h1&gt;

&lt;p&gt;Statistical analysis demonstrates WebForms Core's significant advantage in Server-Centric scenarios across critical performance indicators. Due to the elimination of heavy runtimes (complex Diffing mechanisms), Time to Interactive (TTI) is substantially reduced in typical server-centric projects.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;SPA Frameworks (React/Vue/Angular)&lt;/th&gt;
&lt;th&gt;WebForms Core&lt;/th&gt;
&lt;th&gt;Improvement Factor&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Time to Interactive (TTI)&lt;/td&gt;
&lt;td&gt;2–5 seconds&lt;/td&gt;
&lt;td&gt;&amp;lt; 1 second&lt;/td&gt;
&lt;td&gt;2–5x faster&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Client Processing Load&lt;/td&gt;
&lt;td&gt;High (Virtual DOM comparison)&lt;/td&gt;
&lt;td&gt;Very Low (direct command execution)&lt;/td&gt;
&lt;td&gt;Significant CPU reduction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bandwidth Consumption&lt;/td&gt;
&lt;td&gt;Medium–High (JSON + metadata)&lt;/td&gt;
&lt;td&gt;Very Low (INI commands)&lt;/td&gt;
&lt;td&gt;Significant bandwidth reduction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Development Complexity&lt;/td&gt;
&lt;td&gt;High (multiple layer management)&lt;/td&gt;
&lt;td&gt;Very Low (server-centric development)&lt;/td&gt;
&lt;td&gt;Development time reduction&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These improvements are not merely claims—they are the direct result of eliminating intermediate layers and automating processes that are performed manually or semi-automatically in other frameworks.&lt;/p&gt;




&lt;h1&gt;
  
  
  When to Use / When Not to Use
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Suitable Scenarios
&lt;/h3&gt;

&lt;p&gt;WebForms Core is particularly well-suited for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enterprise business applications with complex business logic&lt;/li&gt;
&lt;li&gt;Admin panels and content management systems&lt;/li&gt;
&lt;li&gt;Data-driven dashboards and reporting tools&lt;/li&gt;
&lt;li&gt;CMS and modular systems requiring frequent extensions&lt;/li&gt;
&lt;li&gt;Server-centric architectures prioritizing control and security&lt;/li&gt;
&lt;li&gt;Projects where development speed and cost efficiency are critical&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Less Suitable Scenarios
&lt;/h3&gt;

&lt;p&gt;It may not be ideal for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Offline-first applications requiring full client-side functionality&lt;/li&gt;
&lt;li&gt;Highly interactive canvas/WebGL applications (games, design tools)&lt;/li&gt;
&lt;li&gt;Client-heavy gaming environments&lt;/li&gt;
&lt;li&gt;Applications requiring full client-side business logic execution&lt;/li&gt;
&lt;li&gt;Scenarios where the application must function without a server connection&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Security Advantages
&lt;/h1&gt;

&lt;p&gt;Because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;All business logic remains server-side&lt;/li&gt;
&lt;li&gt;The client receives only execution commands&lt;/li&gt;
&lt;li&gt;No sensitive algorithms or business rules are embedded in client bundles&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Business rules are never transferred to the client runtime, eliminating an entire class of security vulnerabilities common in SPAs.&lt;/p&gt;

&lt;p&gt;Version 2.0 introduces:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Native Unit Testing for Action Controls&lt;/li&gt;
&lt;li&gt;DOM verification without external tools like Selenium or Cypress&lt;/li&gt;
&lt;li&gt;Built-in protection against common session-based attacks&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;WebForms Core, developed by Elanat, represents an intelligent redefinition of the server–client relationship in the modern era. By:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Eliminating manual frontend coding requirements&lt;/li&gt;
&lt;li&gt;Automating data serialization and event management&lt;/li&gt;
&lt;li&gt;Providing intelligent DOM control through Action Controls&lt;/li&gt;
&lt;li&gt;Introducing an extremely lightweight protocol for server-client communication&lt;/li&gt;
&lt;li&gt;Removing developer involvement in manual configurations and frontend complexities&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This technology has successfully minimized the complexities prevalent in modern frameworks. The primary goal—reducing developer engagement with manual configurations and frontend complexities—has not only been achieved but has become a new standard for rapid, scalable web development.&lt;/p&gt;

&lt;p&gt;For organizations seeking:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lower development costs through reduced team specialization requirements&lt;/li&gt;
&lt;li&gt;Higher security through server-centric architecture&lt;/li&gt;
&lt;li&gt;Better performance through eliminated intermediate layers&lt;/li&gt;
&lt;li&gt;Faster scalability through stateless design&lt;/li&gt;
&lt;li&gt;Simplified maintenance through automatic modularity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;WebForms Core offers a fundamentally different, server-empowered paradigm that reclaims control of the user interface from heavy client-side runtimes and restores architectural simplicity to modern web development. It presents a revolutionary approach, distinct from common Client-Centric models, that harnesses the full power of the server in service of the user interface.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>frontend</category>
      <category>architecture</category>
      <category>webformscore</category>
    </item>
    <item>
      <title>Rock ✊ Paper ✋ Scissors ✌️</title>
      <dc:creator>Elanat Framework</dc:creator>
      <pubDate>Sat, 14 Feb 2026 19:46:55 +0000</pubDate>
      <link>https://forem.com/elanatframework/rock-paper-scissors-3adb</link>
      <guid>https://forem.com/elanatframework/rock-paper-scissors-3adb</guid>
      <description>&lt;h2&gt;
  
  
  What is WebForms Core?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/webforms-core" rel="noopener noreferrer"&gt;WebForms Core&lt;/a&gt; is a new multi-platform technology from &lt;a href="https://elanat.net" rel="noopener noreferrer"&gt;Elanat&lt;/a&gt; that is designed to compete with modern front-end frameworks, not an old ported version on .NET Core.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example of Rock Paper Scissors
&lt;/h2&gt;

&lt;p&gt;This example is a completely offline implementation using WebForms Core technology. In this example, commands are written on the server that declare the nature of the behavior to the client.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9df0yunb17y4tcwuawoi.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9df0yunb17y4tcwuawoi.jpg" alt="WebForms Core Games" width="474" height="285"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: The HTML output of the example can be copied and used offline without the need for a server.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As you can see, there are no additional tags in the HTML file. Unlike other Server-Driven UI systems, in WebForms Core technology, the server has no direct relationship with the HTML; in fact, the server is not only stateless, but also completely blind! This is a feature of WebForms Core technology that provides the following benefits:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Flexibility&lt;/strong&gt;: The server can serve different clients with different views (web, mobile, desktop)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Scalability&lt;/strong&gt;: Different teams can work in parallel on the server and client sides&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Easier maintenance&lt;/strong&gt;: Changing the appearance of the site does not require changing the server logic&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Security&lt;/strong&gt;: Data is transferred raw and the client only displays what it needs&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reusability&lt;/strong&gt;: The built-in APIs can be used in multiple projects&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Interestingly, we do not experience the benefit of Server Blindness in a server-centric system.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Golden sentence:&lt;/strong&gt;&lt;br&gt;
The server is not blind because it does not understand;&lt;br&gt;
It is blind because it does not need to see.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;HTML&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;@page
@controller RockPaperScissorsController
&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;WebForms Core Technology&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"module"&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://cdn.jsdelivr.net/gh/webforms-core/Web_forms@elanat_framework/web-forms.js"&lt;/span&gt; &lt;span class="na"&gt;defer&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Rock ✊ Paper ✋ Scissors ✌️&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt; &lt;span class="na"&gt;win-with=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"Rock"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Rock ✊&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"1"&lt;/span&gt; &lt;span class="na"&gt;win-with=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"Paper"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Paper ✋&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt; &lt;span class="na"&gt;win-with=&lt;/span&gt;&lt;span class="s"&gt;"1"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"Scissors"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Scissors ✌️&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"computer"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Computer choice: &lt;span class="nt"&gt;&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"result"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"counter"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Game match: &lt;span class="nt"&gt;&amp;lt;span&amp;gt;&lt;/span&gt;0&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"win-counter"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Game win: &lt;span class="nt"&gt;&amp;lt;span&amp;gt;&lt;/span&gt;0&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Server Code&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;CodeBehind&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;partial&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;RockPaperScissorsController&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;CodeBehindController&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;PageLoad&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;HttpContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;       
        &lt;span class="n"&gt;WebForms&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;WebForms&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

        &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetCommentEvent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"&amp;lt;button&amp;gt;*"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;HtmlEvent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;OnClick&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"play"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;StartIndex&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"play"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Increase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"counter|&amp;lt;span&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;AddSessionCacheValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"random"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Fetch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
        &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"result"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"😢 You lose!"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;IsEqualTo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Fetch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;GetAttribute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"$"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"win-with"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;Fetch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Saved&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"random"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
        &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;StartBracket&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"result"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"😀 You win!"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Increase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"win-counter|&amp;lt;span&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;EndBracket&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;IsEqualTo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Fetch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;GetAttribute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"$"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"value"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;Fetch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Saved&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"random"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
        &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"result"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"😐 Equal!"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;IsEqualTo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Fetch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Saved&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"random"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
        &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"computer|&amp;lt;span&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Rock ✊"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;IsEqualTo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Fetch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Saved&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"random"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
        &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"computer|&amp;lt;span&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Paper ✋"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;IsEqualTo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Fetch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Saved&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"random"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
        &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"computer|&amp;lt;span&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Scissors ✌️"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="nf"&gt;Write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ExportToHtmlComment&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Result&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!--[web-forms]
Eb&amp;lt;button&amp;gt;*=onclick|play|
#=play
gtcounter|&amp;lt;span&amp;gt;=i|1
SA=random|@mr3,0
stresult=😢 You lose!
{et=@$a$,win-with|@csrandom
{
stresult=😀 You win!
gtwin-counter|&amp;lt;span&amp;gt;=i|1
}
{et=@$a$,value|@csrandom
stresult=😐 Equal!
{et=0|@csrandom
stcomputer|&amp;lt;span&amp;gt;=Rock ✊
{et=1|@csrandom
stcomputer|&amp;lt;span&amp;gt;=Paper ✋
{et=2|@csrandom
stcomputer|&amp;lt;span&amp;gt;=Scissors ✌️--&amp;gt;&lt;/span&gt;
&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;WebForms Core Technology&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"module"&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://cdn.jsdelivr.net/gh/webforms-core/Web_forms@elanat_framework/web-forms.js"&lt;/span&gt; &lt;span class="na"&gt;defer&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Rock ✊ Paper ✋ Scissors ✌️&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt; &lt;span class="na"&gt;win-with=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"Rock"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Rock ✊&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"1"&lt;/span&gt; &lt;span class="na"&gt;win-with=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"Paper"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Paper ✋&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt; &lt;span class="na"&gt;win-with=&lt;/span&gt;&lt;span class="s"&gt;"1"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"Scissors"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Scissors ✌️&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"computer"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Computer choice: &lt;span class="nt"&gt;&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"result"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"counter"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Game match: &lt;span class="nt"&gt;&amp;lt;span&amp;gt;&lt;/span&gt;0&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"win-counter"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Game win: &lt;span class="nt"&gt;&amp;lt;span&amp;gt;&lt;/span&gt;0&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Overview of the Example
&lt;/h2&gt;

&lt;p&gt;This example demonstrates a fully interactive Rock–Paper–Scissors game &lt;strong&gt;without writing any JavaScript business logic&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;All game logic runs on the server&lt;/li&gt;
&lt;li&gt;The browser receives clean, standard HTML&lt;/li&gt;
&lt;li&gt;A lightweight client engine executes declarative instructions&lt;/li&gt;
&lt;li&gt;No page reloads occur during interaction&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  HTML Section: Structure Only, No Logic
&lt;/h2&gt;

&lt;p&gt;The HTML defines only the user interface:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Three buttons for user choice&lt;/li&gt;
&lt;li&gt;Text containers for results and counters
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt; &lt;span class="na"&gt;win-with=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Rock ✊&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"1"&lt;/span&gt; &lt;span class="na"&gt;win-with=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Paper ✋&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt; &lt;span class="na"&gt;win-with=&lt;/span&gt;&lt;span class="s"&gt;"1"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Scissors ✌️&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Key points:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;value&lt;/code&gt; represents the user’s choice&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;win-with&lt;/code&gt; defines which option this choice defeats&lt;/li&gt;
&lt;li&gt;No JavaScript, conditions, or event handlers are present&lt;/li&gt;
&lt;li&gt;The HTML remains clean, SEO-friendly, and fully valid&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Server Code: Declarative Behavior Definition
&lt;/h2&gt;

&lt;p&gt;On the server side, a &lt;code&gt;WebForms&lt;/code&gt; object is created and the entire page behavior is defined declaratively.&lt;/p&gt;

&lt;h3&gt;
  
  
  Event Binding
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetCommentEvent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"&amp;lt;button&amp;gt;*"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;HtmlEvent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;OnClick&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"play"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This instruction means:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“When any &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt; is clicked, trigger an event named &lt;code&gt;play&lt;/code&gt;.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Entry Point of the Logic
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;StartIndex&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"play"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All logic that follows runs &lt;strong&gt;only when the &lt;code&gt;play&lt;/code&gt; event is triggered&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Game Logic Step by Step
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Increase the Match Counter
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Increase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"counter|&amp;lt;span&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each click increments the total number of matches.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. Generate the Computer’s Choice
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;AddSessionCacheValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"random"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Fetch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A random value (0–2) is generated and stored in the session.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. Default Result: Loss
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"result"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"😢 You lose!"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The game assumes a loss by default, which may be overridden by later conditions.&lt;/p&gt;




&lt;h3&gt;
  
  
  4. Check for User Win
&lt;/h3&gt;

&lt;p&gt;If the clicked button’s &lt;code&gt;win-with&lt;/code&gt; attribute matches the computer’s choice:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"result"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"😀 You win!"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Increase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"win-counter|&amp;lt;span&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The result is updated and the win counter is increased.&lt;/p&gt;




&lt;h3&gt;
  
  
  5. Check for a Draw
&lt;/h3&gt;

&lt;p&gt;If the button’s &lt;code&gt;value&lt;/code&gt; matches the computer’s choice:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"result"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"😐 Equal!"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The game ends in a draw.&lt;/p&gt;




&lt;h3&gt;
  
  
  6. Display the Computer’s Choice
&lt;/h3&gt;

&lt;p&gt;Based on the random value, the corresponding text is displayed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;0&lt;/code&gt; → Rock ✊&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;1&lt;/code&gt; → Paper ✋&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;2&lt;/code&gt; → Scissors ✌️&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Final Output: DSL Inside an HTML Comment
&lt;/h2&gt;

&lt;p&gt;All server-defined behavior is exported as a compact DSL and embedded into the HTML as a comment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!--[web-forms]
Eb&amp;lt;button&amp;gt;*=onclick|play|
#=play
gtcounter|&amp;lt;span&amp;gt;=i|1
...
--&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This comment:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is ignored by the browser’s rendering engine&lt;/li&gt;
&lt;li&gt;Is parsed by the &lt;a href="https://elanat.net/page_content/web_forms_core" rel="noopener noreferrer"&gt;WebForms Core&lt;/a&gt; client engine&lt;/li&gt;
&lt;li&gt;Enables partial DOM updates&lt;/li&gt;
&lt;li&gt;Avoids full page reloads&lt;/li&gt;
&lt;li&gt;Keeps HTML clean and untouched&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Final Result
&lt;/h2&gt;

&lt;p&gt;This example demonstrates that with WebForms Core:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HTML remains purely structural&lt;/li&gt;
&lt;li&gt;All business logic is handled on the server&lt;/li&gt;
&lt;li&gt;JavaScript acts only as a lightweight execution engine&lt;/li&gt;
&lt;li&gt;UI updates are reactive without using SPA frameworks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Rock–Paper–Scissors example clearly shows how WebForms Core enables &lt;strong&gt;modern, stateful, and interactive web applications&lt;/strong&gt; while preserving the simplicity and clarity of traditional HTML.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does this example prove?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1- WebForms Core is a true Server-Driven UI here
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;No PostBack, no ViewState.&lt;/li&gt;
&lt;li&gt;Events are declarative-like.&lt;/li&gt;
&lt;li&gt;State is determined from the server to the client.&lt;/li&gt;
&lt;li&gt;Only logical diff goes to the client.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is very close to the philosophy of modern Live UIs.&lt;/p&gt;

&lt;h3&gt;
  
  
  2- The HTML is completely clean and standard
&lt;/h3&gt;

&lt;p&gt;This is very important:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt; &lt;span class="na"&gt;win-with=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Rock&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You don't have any weird tags, heavy custom attributes or dirty markup.&lt;/p&gt;

&lt;p&gt;This means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SEO Healthy&lt;/li&gt;
&lt;li&gt;Progressive Enhancement&lt;/li&gt;
&lt;li&gt;Full compatibility with front-end tools&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3- Game logic written without a single line of JS
&lt;/h3&gt;

&lt;p&gt;This is the key point.&lt;/p&gt;

&lt;p&gt;In many modern frameworks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Either JS is heavy&lt;/li&gt;
&lt;li&gt;Or WebAssembly&lt;/li&gt;
&lt;li&gt;Or complex build pipeline&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here:&lt;br&gt;
&lt;strong&gt;All game logic is in C#, UI is just listener.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is what many have been looking for for years but it was not implemented cleanly.&lt;/p&gt;

&lt;h3&gt;
  
  
  4- DSL inside Comment is an unexpected and smart move
&lt;/h3&gt;

&lt;p&gt;This part is a surprise!&lt;/p&gt;

&lt;p&gt;No JSON, no inline script, no data blob.&lt;/p&gt;

&lt;p&gt;But still:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Parsable&lt;/li&gt;
&lt;li&gt;Secure&lt;/li&gt;
&lt;li&gt;Cache-friendly&lt;/li&gt;
&lt;li&gt;And invisible to the browser&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This shows that the design of this technology is conscious and deep.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tutorial</category>
      <category>game</category>
      <category>webformscore</category>
    </item>
    <item>
      <title>Comparing WebForms Core with Microsoft Classic WebForms: Revolution vs. Tradition</title>
      <dc:creator>Elanat Framework</dc:creator>
      <pubDate>Fri, 13 Feb 2026 11:25:10 +0000</pubDate>
      <link>https://forem.com/elanatframework/comparing-webforms-core-with-microsoft-classic-webforms-revolution-vs-tradition-g03</link>
      <guid>https://forem.com/elanatframework/comparing-webforms-core-with-microsoft-classic-webforms-revolution-vs-tradition-g03</guid>
      <description>&lt;p&gt;First of all, we must clarify an important fact: &lt;strong&gt;&lt;a href="https://github.com/webforms-core" rel="noopener noreferrer"&gt;WebForms Core&lt;/a&gt; is not a product of Microsoft&lt;/strong&gt;. This technology was introduced by &lt;a href="https://elanat.net" rel="noopener noreferrer"&gt;Elanat&lt;/a&gt; in 2024. While it offers an experience similar to Microsoft WebForms, it is a completely new and independent architecture that is merely inspired by the WebForms name and shares &lt;strong&gt;no technical commonality&lt;/strong&gt; with Microsoft’s classic version.&lt;/p&gt;




&lt;h2&gt;
  
  
  Comprehensive Comparison Table
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Comparison Axis&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Classic WebForms (Microsoft)&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;WebForms Core (Elanat)&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Comparison Result&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Release Year&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;2002&lt;/td&gt;
&lt;td&gt;2024&lt;/td&gt;
&lt;td&gt;22-year technology gap&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Platform&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;.NET Framework (Windows)&lt;/td&gt;
&lt;td&gt;All popular web programming languages (cross-platform)&lt;/td&gt;
&lt;td&gt;WebForms Core is modern and cross-platform&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Support Status&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Deprecated&lt;/strong&gt; – Not supported in .NET Core&lt;/td&gt;
&lt;td&gt;Actively maintained&lt;/td&gt;
&lt;td&gt;Microsoft has abandoned WebForms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Architecture Model&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Server-side, Page-centric&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Hybrid Server-Client&lt;/strong&gt;, Commander-Executor&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Fundamental difference&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;State Management&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;ViewState&lt;/strong&gt; – heavy, Base64&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Stateless&lt;/strong&gt; – no ViewState&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Major revolution&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;DOM Modification&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Postback + full page reload&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;INI commands&lt;/strong&gt; + Ajax + direct DOM manipulation&lt;/td&gt;
&lt;td&gt;WebForms Core: 1000× lighter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Data Format&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;ViewState (Base64, bulky)&lt;/td&gt;
&lt;td&gt;INI-like (text-based, tens of bytes)&lt;/td&gt;
&lt;td&gt;WebForms Core: 99% size reduction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Server Round-trips&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;For every interaction&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Only when needed&lt;/strong&gt; + full client execution possible&lt;/td&gt;
&lt;td&gt;Massive traffic reduction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Client-side Payload&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;~380 KB (ASP.NET Ajax)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;40 KB&lt;/strong&gt; (WebFormsJS)&lt;/td&gt;
&lt;td&gt;~90% lighter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;HTML Flexibility&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Limited to server controls&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Full access&lt;/strong&gt; to all HTML elements&lt;/td&gt;
&lt;td&gt;Full developer freedom&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Server Load&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Very high&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Very low&lt;/strong&gt; (stateless)&lt;/td&gt;
&lt;td&gt;Unlimited scalability&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Bandwidth Usage&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Optimized&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Significant cost reduction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Backend Learning Curve&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Very low&lt;/strong&gt; (just C#)&lt;/td&gt;
&lt;td&gt;Flat learning curve&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Windows Dependency&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Mandatory (IIS)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;None&lt;/strong&gt; (Linux, macOS, Windows)&lt;/td&gt;
&lt;td&gt;Deploy anywhere&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;MVC/Razor Integration&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Impossible&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Full&lt;/strong&gt; – alongside MVC, Razor, Minimal API&lt;/td&gt;
&lt;td&gt;Gradual migration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Language Support&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;C# and VB.NET only&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Multi-language&lt;/strong&gt; (C#, Python, Java, PHP, Node.js, Go, Rust)&lt;/td&gt;
&lt;td&gt;Beyond .NET&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Offline Capability&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Yes&lt;/strong&gt; (incl. Service Workers)&lt;/td&gt;
&lt;td&gt;PWA-ready&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Real-time Support&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Separate SignalR&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Built-in&lt;/strong&gt; (SSE + WebSocket)&lt;/td&gt;
&lt;td&gt;Simpler and integrated&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  In-depth Analysis of Fundamental Differences
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Architectural Philosophy: Page-Centric vs. Commander-Executor
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Classic WebForms&lt;/strong&gt; is based on the &lt;em&gt;Page Lifecycle&lt;/em&gt; concept. Every user interaction sends the entire page back to the server (Postback), the full lifecycle is executed, ViewState is reconstructed, and the entire HTML is re-rendered. This model is inherently expensive and inefficient.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WebForms Core&lt;/strong&gt; uses the &lt;strong&gt;Commander-Executor&lt;/strong&gt; pattern. The server acts as the commander and issues INI-like commands. The client (WebFormsJS) receives these commands and applies them directly to the DOM. There is no Postback, no Page Lifecycle, and no ViewState. This distinction creates &lt;strong&gt;two completely different worlds&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. State Management Revolution: The Death of ViewState
&lt;/h3&gt;

&lt;p&gt;Perhaps the biggest weakness of classic WebForms was &lt;strong&gt;ViewState&lt;/strong&gt;. This hidden field, sometimes hundreds of kilobytes in size, stored the state of all controls in Base64 and was transmitted back and forth with every request.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WebForms Core completely eliminates ViewState&lt;/strong&gt;. No state is stored in the page. The server is stateless, and each request is processed independently. This results in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Complete removal of ViewState overhead&lt;/li&gt;
&lt;li&gt;99% reduction in bandwidth usage&lt;/li&gt;
&lt;li&gt;Dramatically faster load times&lt;/li&gt;
&lt;li&gt;Infinite horizontal scalability (no sticky sessions required)&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  3. Programming Model: Server Controls vs. Free HTML
&lt;/h3&gt;

&lt;p&gt;In &lt;strong&gt;classic WebForms&lt;/strong&gt;, developers were forced to use &lt;code&gt;&amp;lt;asp:TextBox&amp;gt;&lt;/code&gt; and other server controls. These controls generated HTML but sacrificed flexibility, often producing unpredictable and non-standard markup.&lt;/p&gt;

&lt;p&gt;In &lt;strong&gt;WebForms Core&lt;/strong&gt;, developers write plain HTML and manipulate it from the server. There are no proprietary controls. You fully own your HTML, and the server merely sends commands such as &lt;code&gt;form.SetBackgroundColor("TextBox1", "red")&lt;/code&gt;, resulting in a lightweight client response like &lt;code&gt;(bcTextBox1=red)&lt;/code&gt;. This means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fully standard and predictable HTML&lt;/li&gt;
&lt;li&gt;Complete freedom to use any CSS framework&lt;/li&gt;
&lt;li&gt;Seamless integration with any JavaScript library&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  4. Independence from Windows and IIS
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Classic WebForms&lt;/strong&gt; was tightly coupled to Windows and IIS. Deploying on Linux or macOS was impossible—a fatal limitation in the cloud-native and container era.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WebForms Core&lt;/strong&gt; is not tied to .NET and is &lt;strong&gt;fully cross-platform&lt;/strong&gt;. It can run on Linux, Windows, macOS, and environments such as Docker and Kubernetes. It can be implemented in all popular web languages such as C#, Python, Java, PHP, and Node.js.&lt;/p&gt;




&lt;h3&gt;
  
  
  5. Support Status and Future Outlook
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Microsoft has explicitly stated that WebForms is not supported in ASP.NET Core&lt;/strong&gt;. The last classic WebForms release shipped in 2018 with .NET Framework 4.8 and will receive no significant future updates. Even CMS platforms such as Sitefinity have discontinued WebForms support.&lt;/p&gt;

&lt;p&gt;In contrast, &lt;strong&gt;WebForms Core is a living and evolving technology&lt;/strong&gt;. Released in 2024, it is actively maintained, with a growing user community.&lt;/p&gt;




&lt;h2&gt;
  
  
  Problems of Classic WebForms and Their Solutions in WebForms Core
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Classic WebForms Problem&lt;/th&gt;
&lt;th&gt;WebForms Core Solution&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Heavy ViewState&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Complete removal via stateless architecture&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Postback with full page refresh&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Ajax + INI commands + targeted DOM updates&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Windows/IIS dependency&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Cross-platform (Linux, macOS, Windows, Docker)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Non-standard controls&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Pure HTML + server-side manipulation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Complex lifecycle&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Simple PageLoad model + direct events&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;No modern framework integration&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Works with MVC, Razor, Minimal API&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Poor testability&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Command-level testability&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SEO limitations&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Standard, crawlable HTML&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;No .NET Core support&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Supports .NET Core and other platforms&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Conclusion: These Two Are Not Comparable
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Classic WebForms and WebForms Core share a name, but not a DNA.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Classic WebForms is a 2002 technology—born in the era of IE6, ViewState, Postback, and Windows-only hosting. It is now obsolete, and even Microsoft has abandoned it.&lt;/p&gt;

&lt;p&gt;WebForms Core is a 2024 technology—modern, cross-platform, stateless, lightweight, and based on standard HTML. It is not a return to the past, but a &lt;strong&gt;leap into the future&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Perhaps the most fitting description comes from the developer community:&lt;br&gt;
&lt;strong&gt;“Turning a terminally ill cancer patient into an Olympic champion.”&lt;/strong&gt;&lt;br&gt;
WebForms Core preserves the familiar name and feel of WebForms while fundamentally fixing all its weaknesses and reimagining it for the modern web era.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fozrluhyj80c5s5u4gd64.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fozrluhyj80c5s5u4gd64.jpg" alt="WebForms Core" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are looking to modernize legacy WebForms projects, WebForms Core offers the lowest migration cost with the highest productivity. And if you are starting a new project, it stands as a serious and efficient option.&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>csharp</category>
      <category>architecture</category>
      <category>webformscore</category>
    </item>
    <item>
      <title>WebForms Core vs Modern Web Concepts: Architectural Similarities and Differences</title>
      <dc:creator>Elanat Framework</dc:creator>
      <pubDate>Thu, 12 Feb 2026 23:19:43 +0000</pubDate>
      <link>https://forem.com/elanatframework/webforms-core-vs-modern-web-concepts-architectural-similarities-and-differences-2c4e</link>
      <guid>https://forem.com/elanatframework/webforms-core-vs-modern-web-concepts-architectural-similarities-and-differences-2c4e</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In most modern front-end frameworks, the client is the primary decision-maker: it builds the UI, manages state, performs data fetching, and reacts to changes. The server is typically reduced to an API provider. &lt;a href="https://github.com/webforms-core" rel="noopener noreferrer"&gt;WebForms Core&lt;/a&gt; (WFC) deliberately reverses this model. In WFC, the server acts as the orchestrator, issuing explicit UI and behavior instructions, while WebFormsJS on the client executes those instructions automatically.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faoqpvh8rqim74zj6twz3.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faoqpvh8rqim74zj6twz3.jpg" alt="WebForms Core" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This article does not aim to provide a simple feature checklist. Instead, it explains how WebForms Core aligns with, diverges from, or intentionally opposes modern web concepts at an architectural level.&lt;/p&gt;

&lt;h2&gt;
  
  
  WebForms Core Example
&lt;/h2&gt;

&lt;p&gt;In traditional WebForms architecture, every client-side event required sending a full page request to the server. This approach led to high bandwidth consumption and reduced response speed. WebForms Core has introduced a fundamental revolution in this area with its innovative &lt;strong&gt;Command-Based Communication&lt;/strong&gt; architecture.&lt;/p&gt;

&lt;h3&gt;
  
  
  Project Structure
&lt;/h3&gt;

&lt;p&gt;A WebForms Core project consists of two main parts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;View&lt;/strong&gt; - HTML file or Razor Page&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Controller&lt;/strong&gt; - Server-side class for event management&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Practical Example: Changing TextBox Color
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;View (Index.cshtml or index.html):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;@page
@controller TextBoxController
&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Change TextBox Color&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"module"&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"/script/web-forms.js"&lt;/span&gt; &lt;span class="na"&gt;defer&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"TextBox1"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt; &lt;span class="na"&gt;placeholder=&lt;/span&gt;&lt;span class="s"&gt;"Write Color"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Server-side Controller (TextBoxController.cs):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;CodeBehind&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;partial&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;TextBoxController&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;CodeBehindController&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;PageLoad&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;HttpContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;       
        &lt;span class="c1"&gt;// Check if keyup parameter exists in QueryString&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Query&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ContainsKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"keyup"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nf"&gt;TextBox_keyUp&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;

        &lt;span class="c1"&gt;// Set up events in initial page load&lt;/span&gt;
        &lt;span class="n"&gt;WebForms&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;WebForms&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetGetEvent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"TextBox1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;HtmlEvent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;OnKeyUp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"?keyup"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="nf"&gt;Write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ExportToHtmlComment&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;TextBox_keyUp&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;WebForms&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;WebForms&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

        &lt;span class="c1"&gt;// Get the value entered by the user&lt;/span&gt;
        &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;colorValue&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Fetch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;GetValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"TextBox1"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="c1"&gt;// Set the background color of TextBox1&lt;/span&gt;
        &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetBackgroundColor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"TextBox1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;colorValue&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="c1"&gt;// Set cache for one year (31536000 seconds)&lt;/span&gt;
        &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetCache&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;31536000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="c1"&gt;// Send response (this is NOT an HTML comment, it's INI text)&lt;/span&gt;
        &lt;span class="nf"&gt;Write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;

        &lt;span class="c1"&gt;// Ignore View and Layout&lt;/span&gt;
        &lt;span class="nf"&gt;IgnoreAll&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Step-by-Step Operation
&lt;/h3&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Phase One: Initial Page Request&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The user enters the page address in the browser. The server calls the controller and executes the &lt;code&gt;PageLoad&lt;/code&gt; method. Since the &lt;code&gt;keyup&lt;/code&gt; parameter is not present in the QueryString, the conditional block is skipped and the event setup code executes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;WebForms&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;WebForms&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetGetEvent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"TextBox1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;HtmlEvent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;OnKeyUp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"?keyup"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nf"&gt;Write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ExportToHtmlComment&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;ExportToHtmlComment&lt;/code&gt; method produces the following output, which is sent as an &lt;strong&gt;HTML comment&lt;/strong&gt; within the page:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!--[web-forms]
EgTextBox1=onkeyup|?keyup--&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This comment is sent to the browser embedded within the complete HTML page. The &lt;code&gt;web-forms.js&lt;/code&gt; script interprets this comment and attaches the &lt;code&gt;keyup&lt;/code&gt; event listener to the &lt;code&gt;TextBox1&lt;/code&gt; element.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Final output sent to the browser:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!--[web-forms]
EgTextBox1=onkeyup|?keyup--&amp;gt;&lt;/span&gt;
&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Change TextBox Color&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"module"&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"/script/web-forms.js"&lt;/span&gt; &lt;span class="na"&gt;defer&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"TextBox1"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt; &lt;span class="na"&gt;placeholder=&lt;/span&gt;&lt;span class="s"&gt;"Write Color"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;strong&gt;Phase Two: User Interaction (KeyUp Event)&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The user types in the TextBox, for example, entering the word "red". The &lt;code&gt;web-forms.js&lt;/code&gt; script sends an Ajax request to the &lt;code&gt;?keyup&lt;/code&gt; address:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GET /page?keyup&amp;amp;TextBox1=red HTTP/1.1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;strong&gt;Phase Three: Request Processing on the Server&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The controller is called again. This time, the QueryString contains the &lt;code&gt;keyup&lt;/code&gt; parameter, so the condition &lt;code&gt;if (context.Request.Query.ContainsKey("keyup"))&lt;/code&gt; is true and the &lt;code&gt;TextBox_keyUp()&lt;/code&gt; method executes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;TextBox_keyUp&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;WebForms&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;WebForms&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="c1"&gt;// Get the value "red" from the TextBox1 parameter&lt;/span&gt;
    &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;colorValue&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Fetch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;GetValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"TextBox1"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// Set TextBox1 background color to red&lt;/span&gt;
    &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetBackgroundColor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"TextBox1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;colorValue&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// Set cache for one year (31536000 seconds)&lt;/span&gt;
    &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetCache&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;31536000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// Send response (this is INI pattern without insert in HTML comment)&lt;/span&gt;
    &lt;span class="nf"&gt;Write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;

    &lt;span class="c1"&gt;// Ignore View and Layout&lt;/span&gt;
    &lt;span class="nf"&gt;IgnoreAll&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;Response()&lt;/code&gt; method produces the following output. &lt;strong&gt;Important: This is NOT sent as an HTML comment, but as plain text (INI) response:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[web-forms]
bcTextBox1=@$vTextBox1
cd=31536000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Unlike the first response which was wrapped in &lt;code&gt;&amp;lt;!-- --&amp;gt;&lt;/code&gt; HTML comment tags, this response is sent as raw text. The &lt;code&gt;web-forms.js&lt;/code&gt; script receives this plain text and parses it directly.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Phase Four: Receiving and Executing Commands in the Browser&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;web-forms.js&lt;/code&gt; script receives the plain text response and interprets it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;bcTextBox1=@$vTextBox1&lt;/code&gt;&lt;/strong&gt;: This means the background color of the element with ID &lt;code&gt;TextBox1&lt;/code&gt; should be set to the value contained in that same field (entered by the user). In this example, the value is "red".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;cd=31536000&lt;/code&gt;&lt;/strong&gt;: Command to cache the page in the browser for 31536000 seconds (one year). &lt;strong&gt;This caching occurs after the keyup event&lt;/strong&gt;, not during initial page load.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After executing these commands:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The TextBox background color immediately changes to red without page refresh&lt;/li&gt;
&lt;li&gt;The page is now stored in the browser cache with a one-year validity&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Phase Five: Subsequent Page Requests&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The next time the user opens the same page, the browser loads it directly from its &lt;strong&gt;local cache&lt;/strong&gt; (thanks to the &lt;code&gt;cd=31536000&lt;/code&gt; command received during the keyup event). No request is sent to the server at all. The &lt;code&gt;[web-forms]&lt;/code&gt; comment containing the event registration still exists in the cached page, so all events remain active.&lt;/p&gt;




&lt;h3&gt;
  
  
  Key Architectural Distinction
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Phase&lt;/th&gt;
&lt;th&gt;Format&lt;/th&gt;
&lt;th&gt;Location&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Initial Request&lt;/td&gt;
&lt;td&gt;HTML Comment &lt;code&gt;&amp;lt;!-- ... --&amp;gt;&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Embedded in HTML&lt;/td&gt;
&lt;td&gt;Register events&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Subsequent Responses&lt;/td&gt;
&lt;td&gt;Plain Text (INI) &lt;code&gt;[web-forms] ...&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Raw response body&lt;/td&gt;
&lt;td&gt;Execute commands + Set cache&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This distinction is crucial: only the initial event registration is sent as an HTML comment. All runtime interactions between client and server use plain text responses, minimizing bandwidth and parsing overhead.&lt;/p&gt;




&lt;h3&gt;
  
  
  Advantages of Command-Based Architecture
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Minimal Bandwidth Consumption:&lt;/strong&gt;&lt;br&gt;
In interactions after the initial load, only a few dozen bytes of plain text are exchanged between server and client. In the example above, the server response size is only 67 bytes!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Significant Reduction in Server Load:&lt;/strong&gt;&lt;br&gt;
Instead of rendering the complete page for each request, the server only executes the event-related logic and returns a small text response. This dramatically reduces CPU and memory consumption.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Smooth and Fast User Experience:&lt;/strong&gt;&lt;br&gt;
Pages respond instantly to user interactions after initial loading. No more white screens, long loading times, or full page refreshes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Intelligent Caching Strategy:&lt;/strong&gt;&lt;br&gt;
Caching is applied &lt;strong&gt;after the first user interaction&lt;/strong&gt;, ensuring that dynamic content works correctly while subsequent visits benefit from instant loading. The developer has full control over cache duration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Simplicity in Implementation:&lt;/strong&gt;&lt;br&gt;
The developer can manage server-side interactions with just a few lines of simple code, without needing to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Write separate JavaScript code&lt;/li&gt;
&lt;li&gt;Set up RESTful APIs&lt;/li&gt;
&lt;li&gt;Manage complex state management&lt;/li&gt;
&lt;li&gt;Use heavy SPA frameworks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;6. Compatibility with MVC Architecture:&lt;/strong&gt;&lt;br&gt;
This approach aligns well with the MVC pattern. The View is responsible for display, the Controller for business logic, and the Model for data.&lt;/p&gt;


&lt;h2&gt;
  
  
  Architectural Flexibility
&lt;/h2&gt;

&lt;p&gt;The above example can also be created in a single step. The comment is sent only once, which records the event and carries the execution command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;CodeBehind&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;partial&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;TextBoxController&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;CodeBehindController&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;PageLoad&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;HttpContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;       
        &lt;span class="n"&gt;WebForms&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;WebForms&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

        &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetCommentEvent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"TextBox1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;HtmlEvent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;OnKeyUp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"keyup"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;StartIndex&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"keyup"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SetBackgroundColor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"TextBox1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Fetch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;GetValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"TextBox1"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

        &lt;span class="nf"&gt;Write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ExportToHtmlComment&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;WebForms Core is so flexible that the developer can use both client-centric and server-centric architectures depending on the need. This flexibility is the biggest strength of this framework.&lt;/p&gt;




&lt;h2&gt;
  
  
  Communication Models and Protocols
&lt;/h2&gt;

&lt;h3&gt;
  
  
  gRPC-like Communication
&lt;/h3&gt;

&lt;p&gt;WebForms Core follows a gRPC-like mental model rather than a literal gRPC implementation. The server sends structured commands that represent intent (UI updates, DOM changes, behavior triggers) rather than raw data alone. While traditional web frameworks may occasionally use server-to-client RPC for narrow use cases (such as gaming or remote control systems), WFC generalizes this approach for everyday web application development, especially form-based and interaction-heavy applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  RESTful Operations
&lt;/h3&gt;

&lt;p&gt;Despite its command-driven nature, WebForms Core remains fully compatible with REST principles. Standard HTTP verbs (GET, POST, PUT, DELETE, etc.) are supported. The difference lies in what is transmitted: instead of returning pure data that the client must interpret, the server may return declarative or imperative instructions that directly modify the UI.&lt;/p&gt;

&lt;h3&gt;
  
  
  JSON and Instruction Transmission
&lt;/h3&gt;

&lt;p&gt;Rather than transmitting verbose JSON payloads meant for client-side processing, WFC uses a compact, instruction-oriented format (similar in spirit to INI). This reduces payload size and eliminates the need for client-side state reconciliation logic.&lt;/p&gt;

&lt;h3&gt;
  
  
  Server-Sent Events (SSE) and WebSocket
&lt;/h3&gt;

&lt;p&gt;WFC natively supports SSE for real-time updates. Connections remain open over HTTP, allowing the server to push incremental UI instructions to the browser. This fits naturally with WFC’s server-driven model and avoids the complexity of polling or heavy client-side reactive streams. WFC also support WebSocket.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: SSE and WebSocket are supported by WebForms Core, but the infrastructure for these two must be implemented by the server.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Rendering Strategies
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Server-Side Rendering (SSR)
&lt;/h3&gt;

&lt;p&gt;WebForms Core supports SSR out of the box. Initial HTML can be fully rendered on the server, ensuring fast first paint and SEO friendliness. Subsequent updates are performed via targeted server-issued commands rather than full page reloads.&lt;/p&gt;

&lt;h3&gt;
  
  
  Client-Side Rendering (CSR)
&lt;/h3&gt;

&lt;p&gt;WFC also supports client-side rendering, but not in the classical SPA sense. Rendering decisions are still controlled by the server. The client executes rendering instructions rather than independently reconstructing UI from state.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hydration (Explicitly Avoided)
&lt;/h3&gt;

&lt;p&gt;Unlike modern frameworks that rely on hydration to attach interactivity to server-rendered HTML, WFC avoids hydration entirely. The initial request delivers HTML plus WebFormsJS. Subsequent interactions return only HTML fragments or action-control instructions. This significantly reduces CPU cost, JavaScript complexity, and memory usage on the client.&lt;/p&gt;

&lt;h3&gt;
  
  
  Static Site Generation (SSG)
&lt;/h3&gt;

&lt;p&gt;Because WFC can generate deterministic HTML output, it integrates well with static site generation workflows. Pages can be pre-rendered and later enhanced with server-driven interactions when connectivity is available.&lt;/p&gt;




&lt;h2&gt;
  
  
  Application Architecture
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Single Page Application (SPA)
&lt;/h3&gt;

&lt;p&gt;From a user experience perspective, WFC applications behave like SPAs: no full-page reloads and only partial updates. Architecturally, however, WFC is not a client-owned SPA. Navigation, routing, and updates are orchestrated by the server.&lt;/p&gt;

&lt;h3&gt;
  
  
  Client-Side Routing
&lt;/h3&gt;

&lt;p&gt;Client-side routing is handled automatically. Anchor tags targeting internal routes are intercepted, preventing page reloads and delegating navigation logic to the server-driven instruction pipeline.&lt;/p&gt;

&lt;h3&gt;
  
  
  Headless Architecture (Intentionally Rejected)
&lt;/h3&gt;

&lt;p&gt;Headless architectures separate rendering from content and logic, pushing responsibility to the client. WFC intentionally rejects this model. The server not only provides data but also dictates presentation and behavior. This is a conscious architectural decision aimed at reducing front-end complexity and centralizing control.&lt;/p&gt;

&lt;h3&gt;
  
  
  Islands Architecture (Conceptual Similarity)
&lt;/h3&gt;

&lt;p&gt;WFC shares conceptual similarities with Islands Architecture in that not all parts of the page are equally interactive. However, the implementation differs fundamentally. Interactivity is not isolated JavaScript islands but server-managed UI regions. Notably, switching server frameworks in WFC is often easier than migrating between front-end frameworks in traditional island-based systems.&lt;/p&gt;




&lt;h2&gt;
  
  
  State, Data, and Binding
&lt;/h2&gt;

&lt;h3&gt;
  
  
  State Management
&lt;/h3&gt;

&lt;p&gt;State is managed automatically on the server. Developers may optionally store transient client state using mechanisms such as AddState, but the overall lifecycle remains server-governed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Data Binding
&lt;/h3&gt;

&lt;p&gt;Unlike declarative, reactive data binding used in modern frameworks, WFC employs imperative, instruction-based binding. Data is injected into HTML elements through explicit server commands rather than through state-diffing or reactive re-rendering.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mapping and Routing
&lt;/h3&gt;

&lt;p&gt;URL and data mapping are largely automatic and align with early web principles. Advanced routing scenarios can be implemented via Service Workers or server-side configuration.&lt;/p&gt;




&lt;h2&gt;
  
  
  Performance and Optimization
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Lazy Loading
&lt;/h3&gt;

&lt;p&gt;Because interactions are event-driven and server-triggered, responses are inherently lazy-loaded. Only required instructions are sent, minimizing bandwidth and processing overhead.&lt;/p&gt;

&lt;h3&gt;
  
  
  Compression and Bandwidth Efficiency
&lt;/h3&gt;

&lt;p&gt;gzip compression can be applied both server-side and client-side. The compact instruction format further reduces payload size compared to traditional JSON-based APIs.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: In WebForms Core technology, both files and form data can be sent with gzip compression, however, please note that it is the server's responsibility to decompress the gzip sent by WebFormsJS to the server.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Virtual DOM (Not Used)
&lt;/h3&gt;

&lt;p&gt;WFC does not implement a Virtual DOM or diffing algorithm. Instead, it uses a transient DOM approach: cloning target elements, applying multiple changes, and committing them in a single operation to prevent flickering and improve perceived performance.&lt;/p&gt;




&lt;h2&gt;
  
  
  Progressive and Modern Web Features
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Progressive Web Apps (PWA)
&lt;/h3&gt;

&lt;p&gt;WFC fully supports PWA capabilities through Service Workers and Web App Manifests. Offline behavior, installability, and caching strategies can all be managed without altering the core architecture.&lt;/p&gt;

&lt;h3&gt;
  
  
  Web Components
&lt;/h3&gt;

&lt;p&gt;WFC does not implement true Web Components (Custom Elements, Shadow DOM). However, reusable components can be effectively simulated through server-side templates, HTML fragments, and extension methods.&lt;/p&gt;

&lt;h3&gt;
  
  
  WebAssembly (WASM)
&lt;/h3&gt;

&lt;p&gt;WFC can invoke WebAssembly modules from the client when needed, allowing high-performance operations without changing the overall programming model.&lt;/p&gt;

&lt;h3&gt;
  
  
  Modern Web APIs
&lt;/h3&gt;

&lt;p&gt;Access to browser APIs such as camera, Bluetooth, or filesystem is not built into the WFC core, but can be enabled through custom JavaScript modules when required.&lt;/p&gt;




&lt;h2&gt;
  
  
  Scalability, Deployment, and Testing
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Serverless and Stateless Design
&lt;/h3&gt;

&lt;p&gt;WebForms Core is fully stateless and compatible with serverless architectures. It works seamlessly behind load balancers and in horizontally scaled environments.&lt;/p&gt;

&lt;h3&gt;
  
  
  Testing Strategy
&lt;/h3&gt;

&lt;p&gt;Testing is primarily server-focused. Because the client-side logic is minimal and protocol-stable, unit testing is simpler and more deterministic. The communication contract is maintained by the framework itself, reducing client-side test complexity.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tooling and CLI
&lt;/h3&gt;

&lt;p&gt;WFC does not introduce a standalone CLI. Instead, it integrates directly into existing back-end projects. Development requires only the server-side WebForms class and inclusion of WebFormsJS in the HTML head.&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://elanat.net/page_content/web_forms_core" rel="noopener noreferrer"&gt;WebForms Core&lt;/a&gt; is modern, but is not an attempt to imitate modern front-end frameworks. It represents a different architectural philosophy: server-driven UI orchestration with a minimal, obedient client. Many modern web concepts are supported, but often in a fundamentally different way. Others are intentionally rejected.&lt;/p&gt;

&lt;p&gt;Rather than asking whether WFC fits into existing categories such as JAMstack, Headless, or Reactive SPA, the better question is whether its server-command model aligns with the goals of the project. For teams seeking reduced front-end complexity, centralized control, and predictable behavior, WebForms Core offers a distinct and coherent alternative.&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>javascript</category>
      <category>tooling</category>
      <category>webformscore</category>
    </item>
    <item>
      <title>Security in WebForms Core</title>
      <dc:creator>Elanat Framework</dc:creator>
      <pubDate>Wed, 11 Feb 2026 00:01:05 +0000</pubDate>
      <link>https://forem.com/elanatframework/security-in-webforms-core-6df</link>
      <guid>https://forem.com/elanatframework/security-in-webforms-core-6df</guid>
      <description>&lt;h2&gt;
  
  
  What is WebForms Core?
&lt;/h2&gt;

&lt;p&gt;Elanat's WebForms Core technology is a modern web development framework based on a completely stateless server architecture, where all application state is stored on the user's browser, so the server does not retain any information from previous sessions. This approach makes the server lightweight, scalable, and fast, and can easily respond to a large number of requests. WebForms Core includes a server class, WebForms, and a lightweight client-side library, WebFormsJS, that communicate bidirectionally, allowing developers to dynamically and interactively update HTML elements without writing complex front-end code. The framework uses lightweight data (such as INI instead of JSON) to improve performance and provides features such as dynamic updates without full page reloads, lazy loading, support for multiple programming languages, and WebSocket communications for real-time interactions. WebForms Core's main focus is on &lt;strong&gt;simplifying web development with full server-side UI control, reducing the need for front-end development, preserving the server-side development experience, and improving performance and scalability&lt;/strong&gt;, while minimizing bandwidth consumption and making it easy to create responsive and interactive user interfaces.&lt;/p&gt;

&lt;h2&gt;
  
  
  HTML‑Aware Parsing, Standard Web Encoding, and Client‑Side Controls
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://elanat.net/page_content/web_forms_core" rel="noopener noreferrer"&gt;WebForms Core&lt;/a&gt; is a &lt;strong&gt;server‑driven web framework&lt;/strong&gt; where client‑side actions are executed based on &lt;strong&gt;structured server instructions&lt;/strong&gt;.&lt;br&gt;
These instructions can be delivered &lt;strong&gt;with HTML&lt;/strong&gt; or &lt;strong&gt;without HTML&lt;/strong&gt;, depending on the request type.&lt;/p&gt;

&lt;p&gt;Understanding this distinction is essential for correctly reasoning about &lt;strong&gt;security&lt;/strong&gt;.&lt;/p&gt;


&lt;h2&gt;
  
  
  Two Delivery Modes for WebForms Instructions
&lt;/h2&gt;
&lt;h3&gt;
  
  
  1. Responses &lt;strong&gt;Without HTML&lt;/strong&gt; (Pure Instruction Payload)
&lt;/h3&gt;

&lt;p&gt;When the server response does &lt;strong&gt;not&lt;/strong&gt; contain HTML (for example: secondary requests, SSE, or AJAX‑style responses), WebForms instructions are sent &lt;strong&gt;directly&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="nn"&gt;[web-forms]&lt;/span&gt;
&lt;span class="py"&gt;_&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;steal()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Key Characteristics
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;No HTML parsing is involved&lt;/li&gt;
&lt;li&gt;No DOM is created&lt;/li&gt;
&lt;li&gt;Instructions are consumed &lt;strong&gt;only by WebFormsJS&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Browser HTML security rules do not apply here because &lt;strong&gt;HTML does not exist&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this mode, security relies entirely on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Trusted server responses&lt;/li&gt;
&lt;li&gt;WebFormsJS Security Options (described later)&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  2. Responses &lt;strong&gt;With HTML&lt;/strong&gt; (Initial Page Load)
&lt;/h3&gt;

&lt;p&gt;When HTML &lt;strong&gt;is present&lt;/strong&gt;, WebForms instructions must be embedded inside the HTML document.&lt;br&gt;
WebForms Core supports &lt;strong&gt;two equivalent containers&lt;/strong&gt;, both interpreted by WebFormsJS.&lt;/p&gt;


&lt;h2&gt;
  
  
  WebForms Instructions Embedded in HTML
&lt;/h2&gt;
&lt;h3&gt;
  
  
  A) HTML Comment Container (Recommended – WebForms Core 2)
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!--[web-forms]
_=steal()--&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Used only when HTML exists&lt;/li&gt;
&lt;li&gt;Keeps the document fully valid and standard&lt;/li&gt;
&lt;li&gt;Does not add nodes to the DOM&lt;/li&gt;
&lt;li&gt;Parsed by WebFormsJS by scanning comment nodes&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;[web-forms]&lt;/code&gt; must appear at the start after trimming&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;
  
  
  B) &lt;code&gt;&amp;lt;web-forms&amp;gt;&lt;/code&gt; Tag Container (Legacy / Backward Compatibility)
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;web-forms&lt;/span&gt; &lt;span class="na"&gt;ac=&lt;/span&gt;&lt;span class="s"&gt;"_=steal()"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/web-forms&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Used only when HTML exists&lt;/li&gt;
&lt;li&gt;Parsed by WebFormsJS via DOM traversal&lt;/li&gt;
&lt;li&gt;Still supported for compatibility&lt;/li&gt;
&lt;li&gt;Less clean because it introduces a custom DOM element&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  Critical Security Principle: HTML Encoding
&lt;/h2&gt;

&lt;p&gt;WebForms Core &lt;strong&gt;does not sanitize user input&lt;/strong&gt;.&lt;br&gt;
It follows the &lt;strong&gt;exact same security rule as standard web development&lt;/strong&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;If user input is HTML‑encoded, it cannot be executed.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  Encoded Example (Safe)
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="ni"&gt;&amp;amp;lt;&lt;/span&gt;!--[web-forms]
_=steal()--&lt;span class="ni"&gt;&amp;amp;gt;&lt;/span&gt;

&lt;span class="ni"&gt;&amp;amp;lt;&lt;/span&gt;web-forms ac=&lt;span class="ni"&gt;&amp;amp;quot;&lt;/span&gt;_=steal()&lt;span class="ni"&gt;&amp;amp;quot;&amp;amp;gt;&amp;amp;lt;&lt;/span&gt;/web-forms&lt;span class="ni"&gt;&amp;amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Result
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;No real HTML comment is created&lt;/li&gt;
&lt;li&gt;No &lt;code&gt;&amp;lt;web-forms&amp;gt;&lt;/code&gt; element exists&lt;/li&gt;
&lt;li&gt;WebFormsJS sees nothing&lt;/li&gt;
&lt;li&gt;Nothing is executed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This behavior is identical to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="ni"&gt;&amp;amp;lt;&lt;/span&gt;script&lt;span class="ni"&gt;&amp;amp;gt;&lt;/span&gt;alert('xss')&lt;span class="ni"&gt;&amp;amp;lt;&lt;/span&gt;/script&lt;span class="ni"&gt;&amp;amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Why Encoding Works Reliably
&lt;/h2&gt;

&lt;p&gt;WebFormsJS &lt;strong&gt;only parses&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Real comment nodes starting with &lt;code&gt;[web-forms]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Real &lt;code&gt;&amp;lt;web-forms&amp;gt;&lt;/code&gt; elements&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Encoded content produces:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Plain text&lt;/li&gt;
&lt;li&gt;No DOM nodes&lt;/li&gt;
&lt;li&gt;No executable instructions&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Client‑Side Security Options in WebFormsJS
&lt;/h2&gt;

&lt;p&gt;For non‑HTML responses and runtime execution control, WebFormsJS provides a &lt;strong&gt;configurable security policy&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Recommended Production Configuration
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;WebFormsOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;DisableEval&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;WebFormsOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;DisableAppendJavaScriptTag&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;WebFormsOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;UseLoadModulePathOnlyInAcceptedList&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;WebFormsOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;LoadModulePathOnlyInAcceptedList&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ui-core&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;math&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="nx"&gt;WebFormsOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;UseCallMethodOnlyInAcceptedList&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;WebFormsOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;CallMethodOnlyInAcceptedList&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;showToast&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;notifySuccess&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="nx"&gt;WebFormsOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;UseCallModuleMethodOnlyInAcceptedList&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;WebFormsOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;CallModuleMethodOnlyInAcceptedList&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;openDialog&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;validateForm&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="nx"&gt;WebFormsOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;SendChecksum&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What This Achieves
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Blocks &lt;code&gt;eval()&lt;/code&gt; execution&lt;/li&gt;
&lt;li&gt;Prevents dynamic &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; injection&lt;/li&gt;
&lt;li&gt;Restricts module loading to trusted paths&lt;/li&gt;
&lt;li&gt;Restricts callable functions to whitelisted ones&lt;/li&gt;
&lt;li&gt;Verifies response integrity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This functions as a &lt;strong&gt;programmable runtime CSP&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Security Responsibilities (Clear Separation)
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Responsibility&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Application&lt;/td&gt;
&lt;td&gt;HTML‑encode user input&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Browser&lt;/td&gt;
&lt;td&gt;Enforce HTML parsing rules&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WebForms Core&lt;/td&gt;
&lt;td&gt;Transport structured instructions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WebFormsJS&lt;/td&gt;
&lt;td&gt;Enforce runtime execution policy&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;No layer overlaps responsibility.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Summary
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;WebForms instructions exist in &lt;strong&gt;two modes&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pure instruction payloads (no HTML)&lt;/li&gt;
&lt;li&gt;HTML‑embedded containers (comment or tag)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;The comment and &lt;code&gt;&amp;lt;web-forms&amp;gt;&lt;/code&gt; containers exist &lt;strong&gt;only when HTML exists&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;HTML encoding alone is sufficient to neutralize injection attempts&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;WebFormsJS adds a second security layer through configurable execution controls&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Security behavior is &lt;strong&gt;identical to standard web applications&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Final Rule
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;If your HTML is safe, your &lt;a href="https://github.com/webforms-core" rel="noopener noreferrer"&gt;WebForms Core&lt;/a&gt; usage is safe.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is by design — not by coincidence.&lt;/p&gt;

</description>
      <category>security</category>
      <category>frontend</category>
      <category>html</category>
      <category>webformscore</category>
    </item>
  </channel>
</rss>
