Asp.net Q on RequiredFieldValidator

hi all
I am using required field validator on say a field called forename and i have two buttons back and continue. At the moment if i click either of these buttons the appropriate error message comes up. However the problem is when i click back i dont want it to ask me to enter the firstname i just want it to move back.Does ny1 have ny idea hw to do this or why my code doesnt work.

aspx code
<asp:TextBox
id="forename"
CssClass="cftextbox"
columns="15"
maxlength="30"
runat="server"
AutoPostBack="false" TabIndex="2"
/>
<asp:RequiredFieldValidator
CssClass="cferror"
ControlToValidate="forename"
Display="none"
ErrorMessage="Please enter a forename"
runat="server" />

c# code
if(e.CommandName == "back"){

Response.Redirect("moveback.aspx");

}else{
if(Page.IsValid) {
do something
e.g. go to next page
}

hope this helps

Thanks to ny1 who can help or throw around a few ideas
AiyshaOh well Never Mind Figured it out
you set the button field 'causevalidation' to false
lol
 
Back
Top