Please help me understand AutoPostBack property of an ASP.NET control

前端 未结 6 1787
时光取名叫无心
时光取名叫无心 2021-01-21 00:16

I\'m learning about ASP.NET, mainly by following through a book, but also making an effort to actually do things along the way. But, I came across an explanation about list cont

6条回答
  •  时光取名叫无心
    2021-01-21 00:26

    If you set AutoPostBack="true" on a control, when it's value changes, it will automatically postback to the server.

    For example if you wanted a dropdown that when changed displayed different data in a table below or something, you might want to postback get the new value so your page could refresh the data.

    This is opposed to style of the dropdown and a button beside it you click to postback, so instead of change value, click the button, you can just change the value with AutoPostBack="true".

提交回复
热议问题