Click here to Skip to main content
15,898,373 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I have an asp.net page and a gridview. And in code behind, i am doing as below

Page_Load()
{
if(!isPostBack)
{
//so that this will enter only when page loads for the first time.
}
}


But my problem is whenever i do a postback, ispostback is returning false and entering the loop in page_load. Kindly help.

Thanks in advance
Naina
Posted
Comments
koool.kabeer 5-Aug-10 5:30am    
are you using Ajax?... if so ..
try using
ScriptManager.GetCurrent(Page).IsInAsyncPostBack

please check this link hope it can help you http://forums.asp.net/t/1031283.aspx[^]
 
Share this answer
 
I have already tried this also. One more point i would like to add is , it happens only on editing the grid
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900