When you try to bind a model field with a dropdownlist in view, you need to create a SelectList in controller then pass that SelectList to view from ViewBag or ViewData, normally there will be a conversion happening from your collection to SelectList, Read the rest of this entry »
When using MEF, you might one day find a class that is marked as export is not exported. Having a look at the trace window in VS, there is a line as:
More than one export was found that matches the constraint:
Resulting in: Cannot set import ‘YYYY..ctor (Parameter=”operand1″, ContractName=”XXXX”)’ on part ‘YYYY’.
Read the rest of this entry »
You might be confused that when lifetime of parts that are created by MEF container.GetExportedValues appeared to be NOT controlled by their container. the confusion comes from that fact that most of MEF documentations have not mentioned that parts could be referenced by other objects in your system apart from container, in that case, container will not be responsible for life time of parts SOLELY. Read the rest of this entry »
Here is a complete example of using wcf and ajax via JQuery, the configuration for wcf under ssl is also included. Read the rest of this entry »
Here is a task we have very often, multiple occurrence or recurring match, this is made easy by understanding zero width assertion and greedy –lazy matching. Read the rest of this entry »