Archive for September 2011

A self-publicity! :)

September 22, 2011

UNPLUGGED…!!! Symphony services September 2011 Edition.

Surprising one….! 🙂

Its me....!

Microsoft Visual Studio 2011 Developer Preview (Web Installer) ready!

September 19, 2011

Overview (Excerpt from Microsoft.com)

Visual Studio 11 Developer Preview is an integrated development environment that seamlessly spans the entire life cycle of software creation, including architecture, user interface design, code creation, code insight and analysis, code deployment, testing, and validation. This release adds support for the most advanced Microsoft platforms, including the next version of Windows (code-named “Windows 8”) and Windows Azure, and enables you to target platforms across devices, services, and the cloud. Integration with Team Foundation Server allows the entire team, from the customer to the developer, to build scalable and high-quality applications to exacting standards and requirements.

http://www.microsoft.com/download/en/details.aspx?id=27543

The .NET Framework 4.5 Developer Preview is also installed as part of Visual Studio 11 Developer Preview.

Note: This prerelease software will expire on June 30, 2012. To continue using Visual Studio 11 after that date, you will have to install a later version of the software.


Pagination / Sorting not works in Custombinding enabled Telerik mvc grid ( v 2011.2.712 ) !

September 19, 2011

I experienced this issue in my development and lost some time figuring out!

Problem description:

Let’s say I have start date & end date and go button for the search and the search result will get displayed in the MVC grid. If I fire rebinding from JavaScript with both the date values, the grid would populate fine. But if I go for sorting/pagination, the “gridcommand” object holds only pagesize and pageno and misses the filter values for start & end date and grid goes with the default data population. But it worked fine with the previous version 2010.3.1318.

The solution is here:

“The additional parameter values passed through Grid’s client-side rebind method are not presisted on subsequent rebinds”

In previous version, as a side effect of another issue, when additional value is passed through the rebind client-side method, it was persisted during the subsequent rebinds. In order to achieve same behavior with current version, the DataBinding event should be use to re-assign the value.

Here you go for the examples:

http://www.telerik.com/help/aspnet-mvc/changes-and-backward-compatibility.html

Hope, it helped!

ASP.NET MVC 4 Preview Released

September 18, 2011

Hope, the following notes and links would help great!

It installs side-by-side with ASP.NET MVC 3, so get started using it today!

Top Features

  • Refreshed and modernized default project templates
  • New mobile project template
  • Many new features to support mobile apps
  • Recipes to customize code generation
  • Enhanced support for asynchronous methods
  • Read the full feature list in the release notes http://www.asp.net/learn/whitepapers/mvc4-release-notes

Software Requirements

The ASP.NET MVC 4 runtime components require the .NET Framework 4. The ASP.NET MVC 4 components for Visual Studio require either Visual Studio 2010 with Service Pack 1 or Visual Web Developer Express 2010 with Service Pack 1.

For reference:

http://theshravan.net/blog/asp-net-mvc-4-roadmap/

http://www.dotnetexpertguide.com/2011/09/aspnet-mvc-4-article-series.html

http://www.dotnetexpertguide.com/2011/09/first-look-at-aspnet-mvc-4-templates.html

http://www.kevinlabranche.com/blog/ASPNETMVC4DeveloperPreviewGoodness.aspx

Technology / Tools update

September 11, 2011

Here are few links about Technology/Tools update:

1. Tip on how to share files between projects in the same solution in C#
Url: http://cplus.about.com/b/2011/09/10/c-tip-for-multiple-projects-in-one-solution.htm

2. Telerik’s Visual Studio Plug-in for Code Analysis (like Re-Sharper)
Url : http://www.telerik.com/products/justcode.aspx
Online Demo : http://tv.telerik.com/search?sortby=most%20recent&libraries=justcode

3. 10 Firefox Add-ons Twitter Users Can’t Live Without
Url : http://www.telerik.com/products/justcode.aspx

SQL Server CTE ( Common Table Expressions )

September 5, 2011

Here are 2 fantastic links….awesome! Hope, you would love reading it! 🙂

http://msdn.microsoft.com/en-us/magazine/cc163346.aspx By John Papa

http://www.simple-talk.com/sql/t-sql-programming/sql-server-cte-basics/ by Robert Sheldon

Cheat sheets / SQL Injection resources

September 4, 2011

Here you can find a hell lot of development cheat sheets and SQL injection related stuff. Worth reading…don’t miss it!

More Cheat-Sheets (and some for SQL Injection Attack!)

http://bit.ly/rtjvbi

Run / Executing SQL files as a batch using SQLCMD and XP_CMDSHELL

September 4, 2011

I had to run a set of SQL files into one of my DB. As i haven’t had a tool (like multiscript), i was checking the easy way of reading the files, reading from my local folder and executing them all in one go.

Here you go…. 🙂

SET NOCOUNT ON

SET XACT_ABORT ON
BEGIN TRAN

DECLARE @DBServerName   VARCHAR(100) = ‘(local)’   — SERVER NAME
DECLARE @DBName VARCHAR(100) = ‘MyDB’  — DB Name
DECLARE @FolderPath   VARCHAR(200) = ‘D:\MyFloder\DBScripts\’  — FOLDER PATH
DECLARE @DirCommand VARCHAR(100) = ‘dir ‘ + @FolderPath + ‘*.sql /b’

DECLARE @FileList TABLE (Files NVARCHAR(MAX))
INSERT INTO @FileList EXEC xp_cmdshell @DirCommand
–SELECT * FROM @FileList

PRINT ‘Execution starts…!’
WHILE (SELECT COUNT(Files) FROM @FileList) > 0
BEGIN
DECLARE @FileName NVARCHAR(MAX) = (SELECT TOP(1) Files FROM @FileList)
DECLARE @command  VARCHAR(500)  = ‘sqlcmd -S ‘ + @DBServerName + ‘ -d  ‘ + @DBName + ‘ -i “‘ + @FolderPath + @Filename +'”‘
–PRINT @command
EXEC xp_cmdshell  @command

PRINT ‘Executed: ‘ + @FileName
DELETE FROM @FileList WHERE Files = @FileName
END
PRINT ‘Execution ends…!’
COMMIT TRAN

Courtesy : Stack overflow.  (Above is the bit tweaked version)