Hi Kareem,
Thank you, but I was actually looking for something to detect the page
reload when it isn't a post back .. such as when Ajax calls are used.
I finally set a hidden variable in the aspx page (default value null)
and set it to some value in the code behind. So the first time, the
hidden variable is null, but on all subsequent reloads ( which dont
involve refresh) it will be null.
Thanks !
On Apr 13, 6:13 pm, "Karim" <jimmy00...@gmail.comwrote:
your answer is hidden in your question
There is a property that you can check to find that
and it is "IsPostback"
example code
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack)
{
//This is a reload, also known as a post back and is caused by an
event on the same page
}
else
{
//This is first load as a result of first browser request or simply
clicking a link on a different page that brings you here or a redirect
}
}