Using MVC and building a control array in the view (on the server) looping through a collection of items using a foreach statement.
All the controls of type = date have the same names and Ids. Everything works fine except that WET associates the datepicker overlay with the first item with that name as many times as there are items in control array. For example, my list has 4 items, all named "dtDatePickerControl". The first instance gets 4 buttons to open the date picker overlay.
ex: foreach(var item in MyCollection)
{
}
Any ideas why this happens?
Using the same ID more than once isn't valid HTML
It's also not valid for MVC the framework will only think there is one datepicker.
@potvinco Can you post an excerpt of the HTML after the server has rendered that code.