| |

VerySource

 Forgot password?
 Register
Search
View: 907|Reply: 8

What's the difference between these two controls?

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-26 15:00:02
| Show all posts |Read mode
1, <asp: TextBox id = "TextBox1" runat = "server"> </ asp: TextBox>
2, <INPUT id = "name" style = "FONT-SIZE: 9pt" maxLength = "50" size = "15" name = "name" runat = "server">

They are both text box controls for inputting information. What is the difference between the two controls? Which one should be used in a normal B / S project?
Thank you!
Reply

Use magic Report

1

Threads

31

Posts

22.00

Credits

Newbie

Rank: 1

Credits
22.00

 Unknown

Post time: 2020-2-17 10:00:02
| Show all posts
It should be the same, except that the two language names are executed differently. One is executed on the server and then returned to the client, and the other is executed on the client, but the final effect is the same.
Reply

Use magic Report

0

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-2-17 10:15:01
| Show all posts
Their properties and methods are different.
If one is .Text and one is .Value

But in the end it is the same in IE.
Reply

Use magic Report

0

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-2-17 13:30:01
| Show all posts
The first is a server-side control that can respond to some events
It is recommended to use the first
Reply

Use magic Report

0

Threads

27

Posts

21.00

Credits

Newbie

Rank: 1

Credits
21.00

 China

Post time: 2020-2-17 15:00:01
| Show all posts
<asp is a web control in .net, it has more functions than INPUT
<INPUT is a traditional HTML language tag, suitable for any browser
If you use asp.net, I suggest using <asp, so you can use C # as the back-end language for programming.
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-2-17 17:30:01
| Show all posts
Is there any difference in the response speed to the program when it is running?
Reply

Use magic Report

0

Threads

24

Posts

20.00

Credits

Newbie

Rank: 1

Credits
20.00

 China

Post time: 2020-2-17 19:15:01
| Show all posts
<asp is a web control in .net, it has more functions than INPUT
<INPUT is a traditional HTML language tag, suitable for any browser
If you use asp.net, I suggest using <asp, so you can use C # as the back-end language for programming.
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-2-17 23:15:01
| Show all posts
asp: textbox is a server-side control provided by .net.
The latter is an html control. Although runat = server can also be added as a server-side control, the function is less than asp: textbox.
b / s applications, it is recommended to use asp: textbox
Reply

Use magic Report

0

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-2-20 14:00:01
| Show all posts
2, <INPUT id = "name" style = "FONT-SIZE: 9pt" maxLength = "50" size = "15" name = "name" runat = "server">

After runat = server, it is the server-side control.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list