If you want to force validation on serverside you need to call Page.Validate()
before you check Page.IsValid
.
protected void btn_GuestListViewAddDialog_YES_Click(object sender, EventArgs e)
{
Page.Validate();
if (Page.IsValid)
{
The LinkButton
must also have a ValidationGroup
, the same valid
-group if you want to validate this group if the link-button was clicked or a different group if you don't want to trigger validation.
Edit: However, Page.Validate
should be redundant since CausesValidation
is true
by default for a LinkButton
and you have specified also a ValidationGroup
for it. So i'm at a loss.