Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > validation problem

Reply
Thread Tools

validation problem

 
 
shin
Guest
Posts: n/a
 
      10-16-2003
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>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Form Validation Problem...Persisiting form fields on validation failure. bnp Javascript 4 05-12-2004 12:16 PM
ASP.NET Web Forms Validation Controls are Server-Side or Client-Side Validation? Matt ASP .Net 14 01-30-2004 09:15 AM
Web form validation vs object validation Colin Basterfield ASP .Net 1 11-29-2003 12:10 AM
validation summary doesnt display when there's client-side validation Libs ASP .Net 0 06-25-2003 03:05 PM
Re: only custom validation control does server side validation? Colin Mackay ASP .Net 0 06-25-2003 07:54 AM



Advertisments