♠ Posted by uvesh in ispostback
Use of IsPostBack property and its example
It is not method.
It is the property in the System.Web.UI namespace.
It should be Page.IsPostBack.
IsPostback property is used to Gets a value that indicates whether the page is being rendered for the first time or is being loaded in response to a postback.
This IsPostBack property returns the boolean value either True or False.
The following example shows how to test the value of the IsPostBack property when the page is loaded
in order to determine whether the page is being rendered for the first time or is responding to a postback.
If the page is being rendered for the first time, the code calls the excuteonpageload() method.
private void Page_Load()
{
if (!IsPostBack)
{
// Validate initially to force asterisks
// to appear before the first roundtrip.
excuteonpageload();
}
}
After render the...