If I have 3 text boxes for 3 field which need to be appended together, how would you go about doing this?
for example:
@Html.TextBoxFor(model => model.PhoneNumber, new { @id = "PhoneNumber1"})
@Html.TextBoxFor(model => model.PhoneNumber, new { @id = "PhoneNumber2"})
@Html.TextBoxFor(model => model.PhoneNumber, new { @id = "PhoneNumber3"})
but when I call model.PhoneNumber in the controller, I only get the first text box value.
You would need multiple phone numbers in your model
phoneNumber1, phoneNumber2, phoneNumber3as you can only bind one element of one type to the model.Alternatively you can use FormCollection
use standard imports instead of model binding
Then in your Controller