Information about IsPostBack Property

Information about IsPostBack Property



This article is for so many people confuse about this 'ispostback' property.

1. This is a Boolean property from Page class from Web.UI namespace.
2. This is a read only property (means we cannot assign true or false).
3. This property is true when POSTBACK occurs.
4. This property is false when the time of page loading.

Coming into controls:

1.Textbox: This control has AutoPostBack property. when the time of postback occurs in the page due to this control. On that time IsPostBack is true. For this control AutoPostback occurs when cursor leaving from textbox when AutoPostBack Property is True for that textbox.

1.Button: This control has no AutoPostBack property because defaultly AutoPostBack is true for button. So when we click a button on a page postback occurs. On that time IsPostBack is true.

1.DropdownList: This control has AutoPostBack property. when the time of postback occurs in the page due to this control. On that time IsPostBack is true. For this control AutoPostback occurs when selected index is changed when AutoPostBack Property of this DropdownList is set to true.

1.ListBox: This control is same like as DropdownList.

1.Hyperlink: This control dont has Autopostback property. when we click this control a page load is occurs. IsPostBack is false


Comments

No responses found. Be the first to comment...