What is Unit Testing in .Net

Unit testing is a kind of testing done at the developer side. It is used to test methods, properties, classes, and assemblies. Unit testing is not testing done by the quality assurance department. To know where unit testing fits into…

Tips for Database ConnectionStrings of Various Provider

Tips for Database ConnectionStrings of Various Provider

Microsoft SQL Server // ODBC DSN using System.Data.Odbc; OdbcConnection conn = new OdbcConnection(); conn.ConnectionString = "Dsn=DsnName;" + "Uid=UserName;" + "Pwd=Secret;"; conn.Open(); // ODBC -- Trusted Connection using System.Data.Odbc; OdbcConnection conn = new OdbcConnection(); conn.ConnectionString = "Driver={SQL Server};" + "Server=ServerName;" +…

Tips to Bind Dropdownlist in Asp.net

Tips to Bind Dropdownlist in Asp.net

We can bind DropDownList in different ways by using List, Dictionary, Enum and DataSet. To bind DropDownList, we need to set some properties: DataSource DataValueField DataTextField Let's see how to use these properties to bind DropDownList. Binding DropDownList with List…

Tips for IIS performance tuning

Custom Error Pages Although this is quite simple to do, few people seem to take advantage of error page customization. Just select the "Custom Errors" tab in MMC and map each error, such as 404, to the appropriate HTML or…

What is Object Oriented Programming( OOP ) Concept ?

Object-oriented programming (OOP) is a programming paradigm that uses “Objects “and their interactions to design applications and computer programs. There are different types of OOPs are used, they are Object Class Data Abstraction & Encapsulation Inheritance Polymorphism Dynamic Binding Message Passing…

How to Generate SHA1 Cryptography in C# and VB.Net

What is SHA1? This part has been copied directly form Wikipedia SHA-1 is a cryptographic hash function designed by the United States National Security Agency and published by the United States NIST as a U.S. Federal Information Processing Standard. SHA…

How to add watermark to an image in c#

using System; using System.Drawing; using System.Drawing.Drawing2D; public class Watermark { //this fuction takes an Image and String for watermarking as argument //and returns an Image with watermark public Bitmap WaterMarkToImage(string ImagePath, string watermark) { Bitmap bmp; bmp = new Bitmap(ImagePath);…

how to read write data in dictionary using c# and VB.net

What is Dictionaries ? Dictionaries are collections that are meant to store lists of key/value pairs to allow lookup of values based on a key.   [VB.Net] Private Sub mycodetips() Dim mycodetips As New Hashtable() 'The first method. mycodetips.Add("MN145098", "Mehran,Jn")…

Top New Features in Visual Studio 2012

1-Opening VS2010 Projects and Not Breaking Things Remember when VS2010 came out? Remember wanting to use it on your team? Remember how projects were incompatible so you had to wait forer the whole team to upgrade? Yea, that sucked. Oh…

Top 5 new features of Visual Studio 2010 and .NET 4

There lots of improvement in Visual Studio 2010 over past version. Below are some new great features of Visual Studio 2010 - Better code intellisense Visual Studio 2010 has better code intellisense support which make it easier for look for…