I am using ASP Login feature and I am binding data for controls like repeaters and div's using the clause
if (!Page.IsPostBack)
If the login is successfull, then it seems all is fine. Otherwise, repeaters and div's etc lose their data.
I have noticed that when the login is successful, it loads the page twice, first with postback and second without postback. If the login fails, then it loads the page only once without postback.
Therefore, what is happening sort of makes sense. However, why do I need to bind data to repeaters all the time? Shouldn't I bind data only when it is not a postback? What is causing the data to unbind?