use viewstate and Custom validator:
protected void Page_Load(object sender, EventArgs e)
{
if (ViewState["TryCount"] != null && (int)ViewState["TryCount"] ==3)
{
}
}
protected void cvLogin_ServerValidate(object source, ServerValidateEventArgs args)
{
if (ViewState["TryCount"] != null)
{
int TryCount = (int)ViewState["TryCount"];
ViewState["TryCount"] = ++TryCount;
}
else
{
ViewState["TryCount"] = 1;
}