Back-end Performance: Optimize ASP.NET speed in 3 steps without coding

Learn Web Stimulus Back-End Acceleration

Back-End Acceleration optimizes slow ASP.NET pages by executing part of the page on the client where HTML is generated and instantly loaded in browser avoiding network delays. You decide on a page-by-page basis where and when to enable Back-end acceleration and client-side functionality. Example below shows how to enable Back-end acceleration in 3 steps in Microsoft Visual Studio.

Note: The sample page is written in VB.NET; Web Stimulus also supports C#

Screenshot Tutorials

Learn Front-End Acceleration. See how to enable Main Accelerate on entire site in 3 steps with zero coding.

Learn Web Stimulus Caching. See how to enable dynamic client caching with your custom caching rules in 2 steps.

Step 1: Enable Web Stimulus on the page.

Upon installing, Web Stimulus automatically adds a new tab to the Visual Studio Toolbox called Web Stimulus Controls. It has two controls: WSPage and WSDataPacket. Drag and drop both of these controls from the toolbox to anywhere on the web page.

Drag and drop two Web Stimulus controls

Drag and drop two Web Stimulus controls.

Step 2: Mark page code for splitting.

Select all the code that will run on the server -> right click -> click "Web Stimulus" menu and click Mark Selection as Server Code. Similarly select client code (Lines 16 and 17 in the sample) and select Mark Selection as Client Code.   @WS tags will surround the code sections (see the next screenshot).

Note 1:  A rule of thumb for splitting code is: all database code must be executed on the server and all data binding and rendering code must be executed on the client.

Note 2:  You can mark as many server and client code sections as you wish. Just make sure that they do not overlap.

Select and mark Server and Client code.

Select and mark Server and Client code.

Step 3: Mark page members for marshalling.

Select declaration of all page members or local variables that need to be marshaled to the client -> Right click -> Click on "Web Stimulus" options -> Click on Mark Selection as Data Packet Member.

These objects will automatically be placed inside a data packet that was created in the first step.

Note: Mark all page members and local variables that are initialized in server code and used in client code to be marshaled.

Select and mark data declaration for marshalling to client.

Select and mark declaration statements of the objects that will be marshaled to the client.

Run this page with 10x traffic reduction and substantially increased performance.

Watch a 3-minute step-by-step video demo of this example.

See or download source code of the web page in this example.

Need even more performance?  See how to enable dynamic client caching with your custom caching rule in 2 steps.