background preloader


Facebook Twitter

Empty Template Text Box. Download control - 37.3 KB.

Empty Template Text Box

Time Period Library for .NET. New in v2: performance improvement and support for accounting (4-4-5) calendar.

Time Period Library for .NET

Introduction When implementing some software for another project, I came across several requirements involving calculations with time periods. These calculations were an important part of the solution and had high demands in respect to the correctness and accuracy of the results. The required functionality covered the following areas: A Performance Counters Helper Class. Download sample - 14.92 KB Introduction In the last project I was working on, we needed to add some performance counters to measure the duration of various parts of the system.

A Performance Counters Helper Class

There is information on performance counters in MSDN and also in CodeProject, but we just could not find the exact information we were looking for. We started by creating a performance counters manager for one part of our system that specifically handled counting duration of operations. But then, we realized that we required similar functionality in other parts of the system. Using the Code. Send ASP.NET formatted exception details via email. XML serialization using Generics.

Download demo - 25.1 KB Serialize/deserialize your objects using generics.

XML serialization using Generics

Customize settings like indentation, encoding, namespaces and others. Table of contents XML Serialization Overview. Claim based Authentication and WIF. Introduction There is a lot of buzz about Claim based Authentication.

Claim based Authentication and WIF


Loading Excel data into a GridView. Send ASP.NET formatted exception details via email. Managing Exception/Error is a common task in any application.

Send ASP.NET formatted exception details via email

In ASP.NET, there are many ways to handle those errors or exceptions, for example, when an error or exception occurrs in an ASP.NET application, the system is going to send a formatted error message to specified developers or teams mentioned in the email list. The difference will be the body of the email will contain exactly the same formatted error as the ASP.NET generated one to display the error or exception details when occurred. Google Charts in ASP.NET. Introduction Through this article, I'll try to explain how we can use Google charts for reporting purposes in ASP.NET web applications.

Google Charts in ASP.NET

Report generation is something quite common and we need to generate self explanatory and good looking reports to the users almost every time. “Images always speak more than words”. How to Configure ASP.NET Unit Tests in Visual Studio 2010. Write your own GetXml function. The DataSet object in .NET has a GetXml function.

Write your own GetXml function

The method takes data from all the tables and from all rows and creates XML. The problem is that you cannot change this XML. So I created a method that does something similar: You can read about in my blog: Gregory Nozik Software Developer (Senior)SuperderivativesIsrael. Using Ajax AutoCompleteExtender for autosuggest. Download source - 2.64 KB Introduction.

Using Ajax AutoCompleteExtender for autosuggest

Web.Config Transformations when Debugging. I am a big fan of the Web.Config Transformations that got introduced with a while back.

Web.Config Transformations when Debugging

Prior to them being inherently supported one could accomplish the same thing with part of the Enterprise Library, and prior to that one could leverage a custom MSBuild Task or the XMLPoke Task to get your web.config updated based on the environment it was targeting. Having your configuration elements managed with a transform file makes it a bit easier to manage and keep track of your settings that could change based on environment or settings. Without this each developer on your team might need to create host entries and keep their folder structure the same to ensure the settings work for each of their machines.

Another option is each team member just has their own configuration files with their specific settings that they need but when source control is introduced this can get tricky because one developer might be overwriting another's settings. 7 Page Jump Methods in ASP.NET. Incrementing AssemblyVersion revision number on each build. On each release (or build operation), we are incrementing our build number to flag that we've done something different. Although Visual Studio has an auto-build/revision feature (use the "*" in the AssemblyVersion attribute), like the following code shows: Calling a C# method using jQuery on the client side. Automatic Zip Extractor.

Introduction Do you get annoyed when you have to do so many things just to open up a compressed file you just downloaded? You have to (Vista+): Right-click Click Properties Click Unblock Click OK Right-click Extract all Extract Delete the .zip file It's like so many other things in Windows, too much clicking and too many steps! Then, on XP machines, there's the problem that if the the Zip file has a ton of files inside which aren't inside of a sub-folder, you get a hundred files extracted to the same directory as the Zip file! Fast Colored TextBox for syntax highlighting.

Introduction For one of my projects, I have felt the need of a text editor with syntax highlighting. At first, I used a component inherited from RichTextBox, but while using it for a large amount of text I found out that RichTextBox highlights very slowly a large number of colored fragments (from 200 and more). When such highlighting has to be made in a dynamic way, it causes a serious problem. Therefore I created my own text component which uses neither Windows TextBox nor RichTextBox.

The rendering of a text was made completely only by the means of GDI+. The component works fast enough with a large amount of text and also possesses tools to make comfortably dynamic syntax highlighting. It has such settings as foreground color, font style, background color which can be adjusted for arbitrarily selected text symbols. Implementation For storage of characters of text, structure Char is used: public struct Char { public char c; public StyleIndex style; }

LINQ to Entities: Basic Concepts and Features. Download source code - 45.3 KB Introduction. Twitter OAuth authentication using .NET. Download source code - 3.9 KB Introduction. Check Website’s Shared Count on Facebook and Twitter. How to use the event log. Build truly RESTful API and website using same ASP.NET MVC code. Getting the default record type of a user for Event Creation in Salesforce.

I have been twisting my head around in finding a solution for this simple task and I guess its worth while to share this information to everyone as I cannot search anything on Google or even in Developer Force any solution related to my problem. DateTime extension method to give Week number. Week number is quite complex: ISO 8601[^] specifies that weeks start on Monday, and that Jan 1st is in week one if it occurs on a Thursday, Friday, Saturday, or Sunday.

Otherwise it is in the last week of the previous year, which may be week 51, 52, or 53. Over the years, I have come up with a couple of ways of handling this, but this version uses recursion to identify the last week of the previous year, and is pretty simple to understand. Resizing images while uploading in ASP.NET. Tired of big sized images uploaded on your website?


RSA private key import from PEM format in C# SIP SMS Example. Introduction. C# Date Time Parser. Introduction Once I needed to parse date&time from internet messages. XML Serialization of Generic Dictionary, Multidimensional Array, and Inherited Type, with sharpSerializer .NET. Calling a code-behind function from JavaScript. Windows Charting Application. Facebook Webpart for SharePoint. Cross Site Scripting... Load all the Country Names of the World in DropDown.