Click here to Skip to main content
15,902,447 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Friends

what is the use of If(IsPostBack) & If(!IsPostBack)?

Give me Real time examples?


Thanking U .
Posted

1 solution

Page.IsPostBack is a property which indicates whether the page is loading for the first time, or as a result of some user interaction. If it is the first time, then you want to set default values for text fields and so on - if it isn't, you don't because that would overwrite the values the user typed.

Generally, it is only needed in the Page.Load event.

Read up on MSDN: http://msdn.microsoft.com/en-us/library/system.web.ui.page.ispostback(v=vs.100).aspx[^]
 
Share this answer
 
Comments
Mohamed Mitwalli 8-Jul-12 9:06am    
5+

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900