How to Hide Stored Procedure’s Code in SQL server?

By | April 2, 2017

WITH ENCRYPTION you can hide the stored procedure’s or function’s code in SQL server. You can hide it with the command WITH ENCRYPTION when you create stored procedure or function.  Example : Let’s create a simple stored procedure. CREATE PROCEDURE SPNAME AS SELECT * from TableName GO Now create the same stored procedure WITH ENCRYPTION… Read More »

DataTable select method with single quote conflict in C#

By | June 24, 2016

I have recently found this error while working on LINQ’s select method. It gave me error when the conditional field contains an apostrophe, it makes my application to throw an exception. My LINQ’s select statement was as below : DataRow[] newDtr = ds.Tables[“TableName”].Select(“Name = ‘” + drData[“Name”].ToString() + “‘”); So, I tried to fix the… Read More »

How to Calculate Age from a Date of Birth using C#.Net?

By | August 26, 2015

You can calculate age from a given date of birth using below code. DateTime PresentYear = DateTime.Now; TimeSpan ts = PresentYear – DateTime.ParseExact(strDob, "dd-MM-yyyy", GlobalVariables.culture); DateTime Age = DateTime.MinValue.AddDays(ts.Days); Now you can put show the age as below : MessageBox.Show(string.Format(" {0} Years {1} Month {2} Days", Age.Year – 1, Age.Month – 1, Age.Day – 1));

How do you modify the web.config appSettings at runtime?

By | August 17, 2015

The web.config file is the configuration file of a web application. It is typically used to configure an ASP.NET Web application and define the configuration settings for that Web application. It contains the application-wide settings, such as database connection string, culture settings, authentication, and authorization information, etc. In ASP.NET 1.x, much effort was required to… Read More »

5 CSS and jQuery Drop Down Menu Scripts

By | June 19, 2015

Navigation Menu is a critical aspect of any website development. It makes easier to users or visitors for navigating from one page to another page. Navigation with dropdown is little confusing and tricky. So, in this post I will feature 5 scripts that you can use on your own sites for jQuery drop down menu.… Read More »

How to use Google reCAPTCHA in ASP.Net?

By | December 19, 2014

Background : This article explains the using of Google reCAPTCHA API in ASP.Net website to prevent input from an automated system. Let us learn about it step-by-step.   What is reCAPTCHA? This is a free service from Google that helps to protect websites from spam and abuse that restricts the automated input sent by a… Read More »