Programming

Previously I thought this was not possible, since the ASP.NET postback involves POST-ing the all-encompassing ASP.NET form, but I am here to tell you, that it is indeed possible to do a postback to a new window or even a popup (created with window.open). In fact, it is surprisingly simple. All you really have to know is that the “target” attribute you know from anchors (links) works exactly the same way for forms!
Continue reading ASP.NET Postback to new Window or Popup

The Microsoft SQL Server Management Studio (even v2008 R2) has problems with executing large SQL-files. To execute these files you need to use the sqlcmd Utility.

Sample usage:

sqlcmd -S myServer\instanceName -i -U loginname -P password C:\myScript.sql

If you need to debug in special condition, like you got a loop and you want to debug the 34th item, you could either set a breakpoint and just skip it 33 times (by pressing f5) or you could simply add a condition to this breakpoint.
You do this by right-clicking the breakpoint and choosing "Condition...".
There you can enter any valid C#-Expression, like "ssList[counter] == 1947635". Now the breakpoint is only hit if this condition is true.

For quite some time now, it has happened to me occasionally that attaching the debugger to the w3wp.exe (IIS worker process) to debug a web application gets extremely slow. I’m talking about several minutes to load all the symbols before it could actually start debugging. In the VS status bar you could see that it took about 1 second for each assembly to load – and we’ve got LOTs of them. In the past, the problem usually went away by itself after a reboot or some other Windows “feature”. This week however it just didn’t get any better. After some Googleing I now think that I have found the solution to the problem: simply delete ALL breakpoints and set a couple of new ones. Don’t ask me how or why exactly, but it seems to be quite reliable.