What is the use of (!IsPostBack)
if (!IsPostBack)
{
// Validate initially to force asterisks
// to appear before the first roundtrip.
Validate();
}
Loading
What is the use of (!IsPostBack)
if (!IsPostBack)
{
// Validate initially to force asterisks
// to appear before the first roundtrip.
Validate();
}
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Munesh SharmaPosted May 9, 2016, 12:15 PM
it return true if the page is being loaded in response to a client postback; else set to false. for example if i have page and it has button control.
when page is first lime load this property is set to false.
when use click on button then client post bask is occur so it set to true.
Rajeesh MenothPosted May 9, 2016, 10:29 AM
Francis SusaimichaelPosted May 9, 2016, 9:21 AM
First of all, "IsPostBack" is an property in ASP.Net Page andit returns truewhen the page postedback by server otherwise it will return true.
Say for example, you have a button in an aspx page and when yourequest the page in the url, the "ispostback" propertyset as "false"when you click on the buttonthe page will submit ( postedback)to the web server (IIS) and the page is processed by the IIS and sent it to browser. At this time it will set the "ispostback" as true.
Vipan SharmaPosted May 9, 2016, 2:06 AM
Ranjit PowarPosted May 9, 2016, 1:22 AM