Always check page validation on Button Click.
HTML Code:
<td>
<asp:textbox id="TxtDisplayName" runat="server" width="490px" xmlns:asp="#unknown">
</asp:textbox></td>
<td>
<asp:requiredfieldvalidator setfocusonerror="True" controltovalidate="TxtDisplayName" xmlns:asp="#unknown">
Display="Dynamic" ValidationGroup="MailSetting" ID="RequiredFieldValidator4"
runat="server" ErrorMessage="">
</asp:requiredfieldvalidator></td>
<asp:button id="btnExtUserCreate" runat="server" validationgroup="MailSetting" onclick="btnExtUserCreate_Click" xmlns:asp="#unknown" />
CS Code
protected void btnExtUserCreate_Click(object sender, EventArgs e)
{
if(Page.IsValid)
{
}
}