S
shin
hi
i have a submit button in my asp page
i want to do some client side validation using requiredfieldvalidator and
regularexpressionvalidator.
if there are no errors i want to redirect to another page.
when there are errors, the client side errors show up properly.
but if i add the foll code....
private void Submit_Click(object sender, System.EventArgs e)
{
Response.Redirect("Successful.aspx");
}
the client side errors dont show up and instead the successful page shows
up. how do i make the errors show up
thanx
-------------
html code snippet
i have 3 requiredfield validators here.
<tr>
<td></td>
<td><asp:button id="Submit" runat="server"
text="Submit"></asp:button></td>
</tr>
<tr vAlign="top">
<td>
<% if (IsPostBack) { %>
<div align="right"><font face="Verdana, Arial, Helvetica, sans-serif"
size="1">Result:</font></div>
<% } %>
</td>
<td><asp:label id="Result" runat="server" CssClass="Result"
Text=""></asp:label>
<asp:validationsummary id="Validationsummary1"
NAME="Validationsummary1" RunAt="Server" CssClass="Result"
HeaderText="There were the following errors" DisplayMode="BulletList">
</asp:validationsummary>
</td>
</tr>
i have a submit button in my asp page
i want to do some client side validation using requiredfieldvalidator and
regularexpressionvalidator.
if there are no errors i want to redirect to another page.
when there are errors, the client side errors show up properly.
but if i add the foll code....
private void Submit_Click(object sender, System.EventArgs e)
{
Response.Redirect("Successful.aspx");
}
the client side errors dont show up and instead the successful page shows
up. how do i make the errors show up
thanx
-------------
html code snippet
i have 3 requiredfield validators here.
<tr>
<td></td>
<td><asp:button id="Submit" runat="server"
text="Submit"></asp:button></td>
</tr>
<tr vAlign="top">
<td>
<% if (IsPostBack) { %>
<div align="right"><font face="Verdana, Arial, Helvetica, sans-serif"
size="1">Result:</font></div>
<% } %>
</td>
<td><asp:label id="Result" runat="server" CssClass="Result"
Text=""></asp:label>
<asp:validationsummary id="Validationsummary1"
NAME="Validationsummary1" RunAt="Server" CssClass="Result"
HeaderText="There were the following errors" DisplayMode="BulletList">
</asp:validationsummary>
</td>
</tr>