How to find objects in Generics with List.Find() method

I’ve been looking for help on how to find objects in Generics with List.Find() method …. and … take a look what I have found.In the follow example, I created a simple class: public class Person{       private int _id;       private string _name;        public int ID {  get{ return _id;} set{ _id = value;}}       public int Name {  get{ return _name;} set{ _name= value;}}        public Person(int id, string name)       {             _id = id;             _name = name;       }} In the example, there’s a simple class with two private attributes. Now we’re going to create a typed List of this object and take … Continue reading How to find objects in Generics with List.Find() method

Adding dynamically WebParts – Problems to move during first execution

There’s a “problem” when we try to add dynamically webparts to a page. In my last project, I had problems to add some dinamicly webparts to able users to move it around the page. When a webpart is dinamicly added to a page, in the first execution, if you try to move it, probably you’ll have the WebPartZones empty. It happens because the aspnet_personalizationPerUser table doesn’t know that a new webPart has been added to the page. This process will happen after the first post to the page. To solve this situation, we have to do some changes to the code, and I’ll help you with … Continue reading Adding dynamically WebParts – Problems to move during first execution