Have spent hours trying to create a Dynamic Data Field Template holding a DropDownList which is extended by the AJAX Cascading DropDown extension.
Final form holds multiple cascading dropdown boxes. User selects Country (Land) then Postcodes, Counties (Provincie) are populated. Once postcode is selected then towns (Plaats) are populated.
The problem I am now facing is that the viewstate for the dropdown lists is not being saved/restored after an insert action or custom validation error. So basically the dropdown lists are being reset to their default values.
Some code (if missing parts, just ask and I will post them) - Don't mind the code structures etc... needs some refactoring :)
Attribute I created:using System;
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
sealed public class CascadingDropDownParametersAttribute : Attribute
//public string TargetControlID; // The ID of the DropDownList to populate.
public string Category; // The name of the category this DropDownList represents.
public string PromptText; // Optional text to display before the user has selected a value from the DropDownList.
View Complete Post