:::: MENU ::::

Thursday, September 17, 2009

In SQL Server you can specify a column as an Identity column (ColumnName int IDENTITY(1,1) NOT NULL) to have SQL Server automatically set the value of this column upon insert by incrementing a seed value.  This works great but I have run into situations where I wanted to change what identity value is assigned during the next insert.  What had happened is that this table in question had the primary key column set as an Identity column. ...

Monday, September 14, 2009

MSBuildShellExtension lets you build .NET projects without ever opening Visual Studio or the command prompt. MSBuild targets can be executed from your favourite file system tool like Windows Explorer or Total Commander. The possibility to extend MSBuildShellExtension with your own targets and editors, makes it a very flexible and useful tool for all .NET developers. ...

Friday, September 11, 2009

0. Know your Keybindings! All these are in the General Development Settings. Searching 1. How to behold the power of incremental search http://blogs.msdn.com/saraford/archive/2007/07/23/did-you-know-behold-the-power-of-incremental-search.aspx Command: Edit.IncrementalSearch Shortcut: Ctrl+i 2. Ctrl+F3 to search for currently-selected word http://blogs.msdn.com/saraford/archive/2007/10/26/did-you-know-ctrl-f3-searches-for-the-currently-selected-string-without-brining-up-the-find-window.aspx...

Wednesday, September 9, 2009

To test the tools which we develop on the team, at times I need to build a website and publish it. I use a simple way of publishing websites from the command line that saves me a LOT of time so thought I would share it. Launch notepad and copy paste the code below and save it as Publish.cmd file. Run visual studio command prompt (as administrator) and run the publish.cmd.      1: @ECHO OFF    2: set WEB_ROOT=C:\inetpub\wwwroot\mytestsite...
Building a connection string from scratch can sometimes be a little daunting when you do not know the exact syntax. Of course, you can always visit www.connectionstrings.com and find some great help there. In lieu of this you can also use the ConnectionStringBuilder class. Each of the ADO.NET providers supplies a version of this class that will build a connection string for you. Below is an example of how to use this class. VB.NET Imports System.Data.SqlClient...

Tuesday, September 8, 2009

Most of the time (If not all) when working on the project we view the website with the help of localhost in debugging mode. Many a times when working on some modules, for solving small problem, we want to write some code that should execute only when running in the localhost or debugging environment. Normally developers would write the code and then take it as their responsibility to remove the code before the code goes to the next environment....

Tuesday, September 1, 2009

Some programming situations require you to use Dynamic SQL. Of course the problem with using Dynamic SQL is that this can lead to SQL Injection attacks. However, you can avoid these problems, by just changing how you submit Dynamic SQL to your back end database. To illustrate this, consider the sample table of users listed below. CREATE TABLE User ( Login char(16) not null primary key, Password varchar(20) not null ) go INSERT INTO User values('PSheriff',...