Hi
I have couple of dropdown controls each with a requiredfieldva lidator. I
clear the dropdownlist in the button click event. When the page is rendered
the dropdown validator already flags it's error message. I checked the
IsValid property in the prerender event and it says it's false.
protected void Button_Click(ob ject sender, EventArgs e)
{
ddl.ClearSelect ion();
Trace.Write(Pag e.Validators[0].IsValid.ToStri ng()); // returns True
}
protected override void OnPreRender(Eve ntArgs e)
{
Trace.Write(Pag e.Validators[0].IsValid.ToStri ng()); // returns False
base.OnPreRende r(e);
}
What could be happening to change the IsValid property to false? I can't see
anything in my code which would do this. What's the best way to debug this?
What other checks should I be making?
Many thanks
Andrew
I have couple of dropdown controls each with a requiredfieldva lidator. I
clear the dropdownlist in the button click event. When the page is rendered
the dropdown validator already flags it's error message. I checked the
IsValid property in the prerender event and it says it's false.
protected void Button_Click(ob ject sender, EventArgs e)
{
ddl.ClearSelect ion();
Trace.Write(Pag e.Validators[0].IsValid.ToStri ng()); // returns True
}
protected override void OnPreRender(Eve ntArgs e)
{
Trace.Write(Pag e.Validators[0].IsValid.ToStri ng()); // returns False
base.OnPreRende r(e);
}
What could be happening to change the IsValid property to false? I can't see
anything in my code which would do this. What's the best way to debug this?
What other checks should I be making?
Many thanks
Andrew
Comment