Friday, January 22, 2010

Get the name of the method

Sometimes it is easy to print the methodname of the current method. This can be typed manually, but with use of Reflection this can be retrieved with the following simple command:

System.Reflection.MethodBase.GetCurrentMethod().Name

Monday, January 11, 2010

Saturday, January 9, 2010

Reflector

Reflector is a tool for disassembly a dll. So you can see the source code and you can analyse if the assembly works correctly.

Link dump

Loading Message with Ajax
http://weblogs.asp.net/aghausman/archive/2009/07/20/show-loading-message-in-asp-net-ajax.aspx

Resolve urls with Javascript
http://weblogs.asp.net/joelvarty/archive/2009/07/17/resolveurl-in-javascript.aspx

Logging guidelines
http://www.bugfree.dk/blog/2009/07/22/basic-logging-guidelines/

Enterprise Library Logging

For logging exception the Enterprise Library an usefull tool.

.NET Validators

When using 'Validators' you must use the property "IsValid" and you must use the method "Validate".
For a CustomValidator you must implement the 'ServerValidate' event.
Also the property 'ClientValidationFunction' must be set to organize the Client side validatie.

source: validator
arguments.value: the control which must be validated
arguments.isvalid: true if the value is valid otherwise false.
- http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.customvalidator.aspx
- http://www.codeproject.com/KB/validation/MultiDependValidator.aspx