What does IsPostBack actually mean?

后端 未结 5 689
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-05 09:37

I am interested to know what specifically Page.IsPostBack means. I am fully aware of it\'s day to day use in a standard ASP.NET page, that it indicates that the user is sub

5条回答
  •  旧巷少年郎
    2021-01-05 10:23

    Check the Request.Form collection to see if it is non-empty. Only a POST will have data in the Request.Form collection. Of course, if there is no form data then the request is indistinguishable from a GET.

    As to the question in your title, IsPostBack is set to true when the request is a POST from a server-side form control. Making your form client-side only, defeats this.

提交回复
热议问题