Framework for replacing the RS (Remote scripting) technology of ASP in ASP.NET

xiaoxiao2021-03-05  21

Guide:

Through an example, how to use the Page.isPostBack property to replace the RS (Remote scripting) technology in the ASP to implement communication with the server side without refreshing the current page.

-------------------------------------------------- ------------------------------

An application of the page.ispostback property can be used to save users

Information, I will introduce another use of it, which is the RS (Remote scripting) technology in the ASP.

As for the basic concepts and usage of RS, I have already introduced many in the ASP version. Its main advantage is not to refresh.

In the case of the current page, communicate with the server side. But because of its underlying, Java technology is used, so it uses

It is still more cumbersome, and I will introduce how to use Page.ispostback in ASP to replace RS technology.

According to my habits, I like to explain the problem with specific examples, so this time I use a simple instance to explain.

problem. In this example, a products.aspx program will be used, which mainly has two server-side controls (Server-Side

Control), this is the new control programming method introduced in ASP , one is a drop-down box control - 'Mudcategories',

The other is a list box control - 'MudProducts'. This example will demonstrate that the content in the list box will follow the contents in the pull box.

The change changes, in order to make it easy, I will implement the database examples from SQL Server.

The products.aspx code is as follows:

<% @ Import namespace = "system.data"%>

<% @ Import namespace = "system.data.ado"%>