Geeks With Blogs
Ben Adler's Development Posting solutions as I find them April 2015 Entries
C# Check if property exists before binding
I had a form view where I was binding two different objects to. These two objects were slightly different, and I didn't want to create a separate form view for both objects.Here is what I did: Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 <%# Container.DataItem.GetType(... != null ? DataBinder.Eval(Container.D... "Property1") : DataBinder.Eval(Container.D... "Property2") %> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table ......

Posted On Wednesday, April 22, 2015 11:23 AM

Copyright © BenAdler | Powered by: GeeksWithBlogs.net