Software

About software and development

Curly braces and String.Format() in C#

Ever wanted to use String.Format on, say, a javascript function? Those include curly braces ( { or } ), but those curly braces are reserved as placeholder marker in String.Format() (i.e. for {0}). Escaping the braces with a backslash does not work.

The solution is pretty simple: You need to double those curly braces to escape them.
String.Format("function test() {{ return calcSomething({0}); }}", "123");

ASP.NET Ajax and validators

Just a sidenote for myself, because I had to struggle with this today:

You need additional assembly for making asp validators work with ajax.

The solution and it’s explanation of it.

Pre-Fill password fields in ASP.NET

Via .NET Student Blog:
You can pre-fill password fields using the .AddAttribute(“value”, password); method on the control.

However, you should try to avoid this. But in some cases (i.e. display password strength / weakness during initial password entry on a “new user” page) this totally makes sense.

IE8 and Tooling available

Yesterday I upgraded my private working system to the freshly released Internet Explorer 8 Beta1.
Today there also is a Internet Explorer 8 Readiness Toolkit with some tooling for developing standard conform web sites.

I’ll have a look at this in the next days.

WP Updated

I just updated my blog alltogether with the theme. Actually it’s quite some work to put that spam protection plugin into the template again.

And one plugin went bananas and so I had to disable the WoW Item plugin. But thats no problem, since I don’t play WoW anymore. ;-)

EKON Spring 2008 – WMI Track

I just finished my track about the Windows Management Instrumentation. It was a very funny track indeed: We just had community members of the Delphi-PRAXiS in the audience. How cool is that? ;-)

Here are the slides and code samples: WMI Slides and code samples

EKON Spring 2008 – MVVM Talk

Yesterday I had my first talk at the EKON Spring. It was all about patterns, concentrated on MVC, MVP, MVVM and some underlying patterns like Observer, Strategy and Command.

Here you can download the slides and a C# WPF Codesample:
MVVM talk slides and code sample

EKON Spring in Frankfurt

I’m going to hold two talks on the EKON 2008 Spring Edition in Frankfurt next week.

The first one will be about the MVVM (Model-View-ViewModel) pattern, introduced with WPF, the second one will show the audience how to use the WMI (Windows Management Instrumentation) from Delphi.

That’s the first time I’m going to talk to a real public audience – until now I only had more or less private trainings with up to 20 people. I just hope, my nerves are going to widthstand that new sort of stress ;-)

See you @EKON spring 2008?

Yesterday, when coming home from the .NET Information Day II in Frankfurt, (Thanks to Jana Paetzold and Daniel Walzenbach for being there!) a Skype message reached me at my mobile.

Talking about Skype on a mobile: That software has a BIG, very BIG hunger on battery power – you can run the phone only a single day with active Skype. They definetly need to do something about that.

But back to topic: The other Daniel sent me gratulations and skyped me a link.

What’s this? Well, actually that means I’m going to hold a session about Windows Management Instrumentation (WMI) with Delphi and one session about the MVVC Pattern at the EKON spring 2008 in february. My first time as a speaker :)

So, do I see you at EKON spring?

TFS – The long way to success??

First of all: I finally did it.
I managed to install a Team Foundation Server 2008. But it was a tricky thing to do – even when sticking literally to the documentation.

It was not a straightforward installation, since the TFS has some requirements you have to prepare manually. Especially when you’re trying to work in a ’2008 only’ environment. Beta operating systems and beta databases are sort of a moving target for infrastructure ;-)

So what are the things you really need?
1.) Microsoft Windows Server 2008 (Codename Longhorn) Beta
2.) Microsoft SQL Server 2008 (Codename Katmai) November CTP
3.) Microsoft Team Foundation Server 2008 (release version from this week ;-) )
4.) Some hours of spare time
5.) Strong nerves ;-)

You begin with installing the – guess – Windows Server. Thats the only really straightforward thing… Mehr >