Hi there,
I need to use IsPostBack Property on my web site but I have understanding issues with it. now after exploring the web, I found that the ist page is loaded as get request but when I click again on the link of the same page so this will be a postback. so what I did is to put IsPostBack property on that page load event as follows
Now the above code when run for the first time so it is ok and work fine but when i click a link of the same page even again and again so i am getting the message"page loaded for the first time". what i thin that it should display the other message as the page is being posted back
please help in this regard what concept I am missing
Regards
I need to use IsPostBack Property on my web site but I have understanding issues with it. now after exploring the web, I found that the ist page is loaded as get request but when I click again on the link of the same page so this will be a postback. so what I did is to put IsPostBack property on that page load event as follows
C#:
if (!IsPostBack)
{
Response.Wriet("page loaded for the first time");
}
else
{
Response.Wriet("page is not loaded for the first time");
}
Now the above code when run for the first time so it is ok and work fine but when i click a link of the same page even again and again so i am getting the message"page loaded for the first time". what i thin that it should display the other message as the page is being posted back
please help in this regard what concept I am missing
Regards
Last edited by a moderator: