Traditional Culture Encyclopedia - Weather forecast - Asp.net's problem of getting the contents of the text box

Asp.net's problem of getting the contents of the text box

Well, if you must understand that there is no difference between us,

Request. Form ["textBox 1"]

This is form submission. In fact, the original server side accepts data submitted by client forms. For example, instead of using server controls, you only use html original controls.

this.textBox 1。 text

And this is the way to gain the value of Microsoft server control. In fact, you will understand that there is no difference between form submission and server control.

Simply put, in the underlying framework of Microsoft,

First, after submitting the form,

Second, intercept the submitted data (request. Form["textBox 1"] may use it)

Third, assign this.textBox 1. Text is added to the server-side control class.

Fourth, of course, you get the data. .

Hehe, this can improve the efficiency of your code writing, but it also has disadvantages. Simplicity can improve coding efficiency, complexity can not improve efficiency, but also increase learning products.

Therefore, it is suggested that while using. Net server control, we should not limit our thinking, but should think about the original way.

Just like humans, you can predict the changes of nature in many ways, such as the weather.

Now people have degenerated with the development of convenient technology.

However, convenient technology does not bring you better predictive ability. So is the weather forecast.

I wish you better and better in the programming industry.