I am trying to make a small change to the createaccount.aspx page that was requested. I am attempting to make it so that, when creating a new account, the first name, last name and phone number are automatically copied from the Account and contact information pane to the Billing Information panel when the same as account info box is checked, as opposed to the default behaviour that copies on the OnClick event of the check box.
I am using the onChange event of the FirstName, LastName and Phone boxes in the account control to copy to the Billing Information. For some reason this works fine for the First and Last Name but gives an error for the phone number. It is obvious from the error message that the compilier can't find the txtPhone box, but I can't figure out why?
For instance this works fine:
But this will give an error:
The error message is this:
'AspDotNetStorefrontControls.Account' does not contain a definition for 'txtPhone' and no extension method 'txtPhone' accepting a first argument of type 'AspDotNetStorefrontControls.Account' could be found
I have checked the source code and it sure looks to me like the Account Control does have a definition for txtPhone, and when I check the rendered source code it is there, so does anyone know why this might work for the name but not phone number elements of the control?
I have even tried to narrow it down by using a simple alert box, but again this works fine, and pops up a message box when the text is changed:
But this gives the same compilation error: