what is ispostback?,waht is autopost back?

what is ispostback?,waht is autopost back?
 
Page.IsPostBack()  

ASP.NET pages post back to themselves.
  • Page.IsPostBack is a boolean (true/false) value that indicates we have posted back to the page (i.e. we have submitted the form).
  • Page.IsPostBack will stop any unnecessary commands from executing multiple times.
For example we may want a function run when the page loads but only if it is loading after
a post back event.
 
Sub PAGE_LOAD()
If Page.IsPostBack then
doMyWork()
End If
End Sub
 
The Page_Load function above calls the doMyWork() function only after a post back event happens.
 
The AutoPostBack Property
• True. When AutoPostBack is True for a control, the control may post back to the server in response to events that you did not want to cause a postback.
 
For example, setting AutoPostBack to True on the TreeView control causes a postback in response to these events: onExpand; onCollapse; onCheck; and onSelectedIndexChange.
• False. By setting AutoPostBack to False, you post back manually in response to a specific event.
 

1 comment:

  1. Is Postback is normally used on page _load event to detect if the web page is getting generated due to postback requested by a control on the page or if the page is getting loaded for the first time

    http://net-informations.com/faq/asp/ispostback.htm ispostback in asp.net

    ling

    ReplyDelete