datatransferobject

Hows to quick check if data transfer two objects have equal properties in C#?

I have these data transfer objects objects: public class Report { public int Id { get; set; } public int ProjectId { get; set; } //and so on for many, many properties. } I don't want to write public bool areEqual(Report a, Report b) { if (a.Id != b.Id) return false; if (a.ProjectId != b.ProjectId) return false; ...

Has Chrome improperly implemented the dataTransfer object?

When I do this in dragstart event: e.dataTransfer.setData('text/plain', 'text'); e.dataTransfer.setData('text/html', 'html'); e.dataTransfer.setData('application/x-bookmark', 'bookmark'); and this in drop event: for (var i = 0; i < e.dataTransfer.types.length; i++) { var type = e.dataTransfer.types[i]; console.log(type + ":" + ...

Handling invalid values with ModelBinder in ASP.NET MVC 1.0

Hey all. First of all some context: I have a form, where I post back some objects that are automatically materialized into objects by MVCs built-in ModelBinder: <input type="hidden" name="myobj[0].Id" /> <input type="text" name="myobj[0].Hours" /> <input type="hidden" name="myobj[1].Id" /> <input type="text" name="myobj[1].Hours" /> ...

HTML5 DataTransfer detection error in Chrome

Trying to detect if files property is supported in DataTransfer Object using Javascript. The following code causes an "Uncaught ReferenceError: DataTransfer is not defined" in Chrome, but IE, Firefox and Safari are all fine. My code is: if ("files" in DataTransfer.prototype) { alert("supported"); } Any idea why or an alternative ...