RequiredFieldValidator and Redirect
I am using a the RequiredFieldValidator and have run across a small problem.
If I put in a quantity, it adds to the cart and redirects me back to the catalog page, just like it's supposed to.
If I don't put in the quantity, it sends the error message to the screen (like it's supposed to), but once I add a quantity in and click the submit button, it remains on the item page, though it does add the item into the cart.
I'm missing something about the RequiredFieldValidator and getting it to Redirect. Here is the code.
Quantity<br><asp:textbox id="ItemQuantity" size="1" runat="server" /><br>
<asp:RequiredFieldValidator id="rfvItemQuantity" ControlToValidate="ItemQuantity" Text="A Quantity is required!" runat="server" /><br><br>
<asp:Button id="btnAddToCart" Text="Add to Cart" OnClick="AddToCart" runat="server" />
And the Redirect code.
Response.Redirect("http://www.mystore.come/OrderForm.aspx")
|