5
Answers

Why we use (!IsPostBack) in c#?

Raja

Raja

8y
241
1
What is the use of (!IsPostBack)

if
(!IsPostBack)
{
 // Validate initially to force asterisks
 // to appear before the first roundtrip.
Validate();
 }
Answers (5)
1
Vipan Sharma

Vipan Sharma

NA 1.1k 934 8y
check below link . It will help you .
http://www.dotnetspider.com/resources/189-AutoPostBack-What-it-is-and-How-it-works.aspx
http://www.codeproject.com/Articles/811684/Understanding-The-Complete-Story-of-Postback-in-AS
0
Munesh Sharma

Munesh Sharma

NA 17.1k 2.4m 8y
IsPostBack is read only property.

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.
0
Rajeesh Menoth

Rajeesh Menoth

NA 24.7k 629.4k 8y
Hi,
 
Using of the IsPostback Property we can check that page is Postback or not if page postback property is true then page is being post back if property is false then page is not postback
 
Reference :
 
https://www.youtube.com/watch?v=yZJQ4Z6kEzs
0
Francis

Francis

NA 11.7k 724.2k 8y

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.

0
Ranjit Powar

Ranjit Powar

NA 8.1k 496.5k 8y
IsPostBack property tells that the page is rendered first time or it is posted back by some server control. If it returns true, it means it is posted back by some control like button click.