Zum Hauptinhalt springen

Using Enums in ASP.NET MVC

If you use enumerations, you usually prefer not to see the internal value of the enum in the GUI, but a human readable (maybe localized) string. The following example shows how easy it is to accomplish that in ASP.NET MVC. We use the following example class that represents a change in a software: public class […]

Prevent „Method not Allowed“ Error when

The error happens when the REST methods (POST, PUT, DELETE, etc). are already registered by another application. The following entries in the  web.config helped me to overcome the issue: <system.webServer> <validation validateIntegratedModeConfiguration=“false“ /> <modules runAllManagedModulesForAllRequests=“true“> <remove name=“WebDAVModule“ /> </modules> <handlers> <remove name=“WebDAV“ /> <remove name=“ExtensionlessUrlHandler-ISAPI-4.0_32bit“ /> <remove name=“ExtensionlessUrlHandler-ISAPI-4.0_64bit“ /> <remove name=“ExtensionlessUrlHandler-Integrated-4.0″ /> <add name=“ExtensionlessUrlHandler-ISAPI-4.0_32bit“ path=“*.“ […]

Using the jQuery DatePicker in ASP.NET M...

This post explains in detail the steps necessary to use the jQuery DatePicker with the ASP.NET MVC Framework to enter dates, instead of the standard Textbox. The description covers globalization, localization, as well as validation. Required NuGet Packages In addition to the standard libraries of jQuery and jQuery UI, the following libraries need to be […]

Obtain IP and MAC Address in C#

There is no built-in way to discover the MAC address of your network adapter in .NET. Using the following function the MAC address that belongs to any IP address can be obtained. The functions use the external DLL iphlpapi.dll. public static class Network { [DllImport(„iphlpapi.dll“, ExactSpelling = true)] private static extern int SendARP(int DestIP, int […]

Some CSS3 Effects

Shadows Draws a shadow of any HTML element. The first is the shadow distance on the Y axis, the second on the X axis. The third value stands for the blurring of the shadow edges. The last value is the shadow color. -webkit-box-shadow: 5px 5px 10px #000000; -moz-box-shadow: 5px 5px 10px #000000; box-shadow: 5px 5px […]