For a couple of my hobby web sites I use an Access database. When I upgrade these website to ASP.NET 4.0 Framework I have had also to update some calls to the database for the DateTime columns, I have to use the ToOADate() method.
Monday, December 6, 2010
Wednesday, November 17, 2010
Repeater: Custom ItemTemplate
When you want to create a custom item template in a repeater you have to readthis article. In this article the css-class and the html depends of the content of the data collection. So you want a different ItemTemplate for another row.
Web.config customErrors element
In de web.config of a (web) application it is possible te configure the customErrors element. Mostly for development I want to see the details of the errors so I can fix these quickly. But when the application runs for end-users I want to be informed about these errors and the users sees a friendly message "there is something wrong, this is registrerd".
Monday, November 1, 2010
ildasm.exe
ildasm.exe. With this tool the assembly manifest is readable and so the related assemblies can be retrieved.
Monday, October 18, 2010
Public token key
With the 'sn.exe' tool of Visual Studio it is possible to retrieve the public token key. But watch for the casing!!
Use the command: sn.exe -Tp "FilePath to assembly"
Tuesday, October 12, 2010
Fiddler and localhost
Working with Fiddler for seeing the details of the Http request of a website is usefull for optimizing the performance of a website. Check if there are unneeded requests or if there are many requests which triggers a 404.
A tip when working with localhost you must http://localhost.:1519/default.aspx instead of
http://localhost:1519/default.aspx. So add a point behind the hostname.
IEnumerable Empty
When creating an IEnumerables, I mostly returned a null value when there are no values for the collection. But it is in some situations better to return an empty collection. This can be done with the Enumerable.Empty method.