ItemsControl with multiple DataTemplates for a viewmodel

You can create multiple ObservableCollections and then bind your ItemsSource to a CompositeCollection which joins those collections. Then in your XAML you can create different DataTemplates for the respective types using the DataType property which like styles gets automatically applied if it is placed in the resources. (You can also create the composite in XAML … Read more

ASP.NET MVC 2 – Html.DropDownListFor confusion with ViewModel

I was also experiencing the same issue. When I debug the Action and look at the ModelState.Values[1].Errors[0].Exception for example, I see the following: {“The parameter conversion from type ‘System.String’ to type ‘System.Collections.Generic.KeyValuePair`2[[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Int64, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]’ failed because no type converter can convert between these types.”} System.Exception {System.InvalidOperationException} In my scenario, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)