sept. 30
When you manipulate XmlDocument, you may need from time to time to copy one XmlNode from one XmlDocument to the other one. For that you may simply use the AppendChild method but you will get the following exception : "The node to be inserted is from a difference context".
Check how you can use the "ImportNode" method to avoid this error. [Plus]
Tags: | |
juin 02
Recently, one of my colleague wanted to call an auto-implemented property setter in a class' constructor.
I do not think this is a good idea as we don't know how the class may evolve in the future.
In this post, I will show some of possible evolutions that make me think that we should not use auto-implemented properties in a class' constructor, but rather use a classical property and thus the member variable. [Plus]
Tags: | | | |
mai 10
I recently wrote a post describing the use of control adapters to adapt the rendering of a control
However there are special things to know where we use control adapters with validators (ie controls deriving - directly or not - from BaseValidator), unless what the rendering result may be far from the one expected. [Plus]
Tags: | | | |
avr. 23
Depending of the browser, some control may need to be rendered differently. By default the .NET framework works with "Control Adapters", id est, some classes that will be plugged into the rendering process.

How does it works ? When the server receives a request, it will try to find which browser does the request, based on the user agent or on HTTP headers for example. To do it rely on some browser definition files (of extension .browser). To see them, please go on %windir%/Microsoft.NET/Framework//CONFIG/Browsers.

When the server has identified the browser (at worse, it would be identified as a "Default" browser), and that it needs to render a control, it will look if there is some control adapters plugged for this kind of control. If there are some, they will be in charge of the rendering. If not, the control will render himself. Note that an adapter can redirect / delegate some treatment to the control.

In this post, I will show
- how to create a basic control adapter
- how to use the adapter in a website (ie how to create a ".browser" file)
- how we can use this for testing purpose (by adapting the user agent used for testing requests) [Plus]
Tags: | | | |
avr. 10
You will find on a Scott Gu's post a list of nice debugger visualiser.

How to install them ? Simply copy the DLLs in the folder
- C:\Documents and Settings\UserName\My Documents\Visual Studio 2005\Visualizers (for a single user)
- C:\Program Files\Microsoft Visual Studio 8\Common7\Packages\Debugger\Visualizers (for all users) [Plus]
Tags: