Hi there,
I wondered if someone can point me in the right direction ? Within an asp.net website, designed in asp.net 1.1 with
vb.net 2003, I have created a form that includes text boxes for payment address details and another small form which has delivery address details.
Within the form I have created a button that copies the address details from the payment address to the delivery address details. This all worked fine until I added some validation controls i.e.
required validation controls to ensure all such fields were completed. Since adding the validation controls to the delivery address form, the copy address details buttons has stopped working. Now I suspect this is linked to the validation controls but any ideas how I can overcome this without moving the form for the delivery address details onto a separate form.
Here's some of the code below :
Button sub-procedure :
Code:
'Copies payment address details to delivery address fields
Sub btnCopy_Click(sender As Object, e As EventArgs)
If Page.IsPostBack Then
'Set DeliveryName text box to equal the PaymentName text box entry
txtDName.Text = txtName.Text
txtDAddress.Text = txtAddress.Text
txtDCity.Text = txtCity.Text
txtDCounty.Text = txtCounty.Text
txtDPcode.Text = txtPcode.Text
txtDCountry.Text = txtCountry.Text
'End If
End Sub
Example of form :
<tr class="cellfillalt">
<td width="140">
<div class="lbltxt" align="right">Post Code: </div></td>
<td width="260">
<p align="center"><asp:TextBox id="txtDPcode" Runat="Server" Size="30"
MaxLength="30"></asp:TextBox>
</p></td>
<td width="160">
<asp:RequiredFieldValidator id="RFDPcode" runat="server" ForeColor=" " ErrorMessage="Enter
delivery post code" CssClass="formerror"
ControlToValidate="txtDPcode"></asp:RequiredFieldValidator></td></tr>
Thanks