Posted by Anuraj on Wednesday, June 25, 2014
Long back I wrote a post about how to create a chrome extension. This post is about creating an extension which will help you to share current page URL on facebook. You can follow the same steps in the previous post except few changes in the background.js file. And facebook uses a URL like this to accept URL - http://www.facebook.com/sharer.php?u=[URL to share].
Posted by Anuraj on Tuesday, June 24, 2014
.Net ASP.Net ASP.Net MVC CodeProject
Today I faced an issue with ASP.Net MVC, I have to download multiple files as a compressed (zip) file. Initially I thought of using third party component like DotNetZip. Later I used ZipArchive class, which comes with .Net Framework 4.5.
Posted by Anuraj on Sunday, June 15, 2014
.Net .Net 4.0 ASP.Net ASP.Net MVC EF Code First Entity Framework SQL Server WPF
Long back I wrote some post about code generation using T4 templates. This post is about generating database entities using T4 templates. This code is pretty straight forward, you are reading the app.config to get the connection string, connecting to db server using Sql Server SMO objects, enumerating tables and columns.
Posted by Anuraj on Monday, June 2, 2014
.Net .Net 3.0 / 3.5 .Net 4.0 Windows Forms
Today I saw some SO question asked about how to get values from Masked Textbox without the masked format. For those who don’t know what is masked textbox - Uses a mask to distinguish between proper and improper user input.
Posted by Anuraj on Wednesday, May 28, 2014
.Net Visual Studio Windows Forms
Visualizers are components of the Visual Studio debugger user interface. A visualizer creates a dialog box or another interface to display a variable or object in a manner that is appropriate to its data type. For example, an HTML visualizer interprets an HTML string and displays the result as it would appear in a browser window; a bitmap visualizer interprets a bitmap structure and displays the graphic it represents. Some visualizers enable you to modify as well as view the data. The Visual Studio debugger includes five standard visualizers. These are the text, HTML, and XML visualizers, all of which work on string objects; the WPF Tree visualizer, for displaying the properties of a WPF object visual tree; and the dataset visualizer, which works for DataSet, DataView, and DataTable objects. Visualizers are represented in the debugger by a magnifying glass icon. When you see the magnifying glass icon in a DataTip, in a debugger variables window, or in the QuickWatch dialog box, you can click the magnifying glass to select a visualizer appropriate to the data type of the corresponding object. Visualizers are not supported on the Compact Framework.
Posted by Anuraj on Tuesday, May 13, 2014
.Net .Net 4.0 ASP.Net MVC EF Code First Entity Framework SQL Server
Long back I wrote a post about Entity Framework Error â€“ The underlying provider failed on Open. Yesterday some one told me, he is getting this error - CREATE DATABASE permission denied in database â€˜masterâ€™, he is using an application pool with NETWORK SERVICE identity. Here is the solution, you require SysAdmin Role for “NT AUTHORITY\NETWORK SERVICE” to resolve this issue.
Posted by Anuraj on Thursday, May 8, 2014
.Net .Net 4.0 CodeProject Win 32 API Windows Forms Windows Phone
This post is about setting Bing wallpaper as your desktop wallpaper using C# and Windows Forms. Bing.com is famous for having some nice pictures as wallpaper, updated on daily basis. The Bing Desktop application comes with same feature. Here is the code snippet, which has two parts one, download the wallpaper image from bing.com and set it as wallpaper using WIN32 APIs.