validation problem

Discussion in 'ASP .Net' started by shin, Oct 16, 2003.

  1. shin

    shin Guest

    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>
     
    shin, Oct 16, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Colin Mackay
    Replies:
    0
    Views:
    2,695
    Colin Mackay
    Jun 25, 2003
  2. Libs
    Replies:
    0
    Views:
    1,504
  3. Colin Basterfield

    Web form validation vs object validation

    Colin Basterfield, Nov 28, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    429
    Tommy
    Nov 29, 2003
  4. Matt
    Replies:
    14
    Views:
    4,110
    Chad Z. Hower aka Kudzu
    Jan 30, 2004
  5. bnp
    Replies:
    4
    Views:
    328
Loading...

Share This Page