Copy a network (shared folder) file using c#
Recently I came across a requirement to copy a network file (shared folder file) in regular time interval. I tried many options. Finally following approach worked properly. We can do following- Login...
View ArticleRestrict datepicker date using database driven dates
In this post we will be discussing restricting dates in jQuery UI datepicker dates using database driven dates. We can restrict date using beforeShowDay event of the datepicker. Inside this function we...
View ArticleMaster-detail with knockout in asp.net MVC 3
In this post we will be discussing creating a master detail relationship with Knockout.js in asp.net MVC 3. For this let’s take a simple view model like below- public class PersonViewModel { public int...
View ArticleCheck whether a function is registered or not to an event in JavaScript
This is a small and simple post to check whether a JavaScript function is registered to an event of a DOM element. For this example we will take a button and click event. We will associate two...
View ArticleRadio button list with knockout.js
Below is a quick example of radio button list with knockout.js- <script src="http://knockoutjs.com/js/knockout-2.1.0.js"...
View ArticleRun a JavaScript function after asp.net client side validation is successful
There are some scenarios where we need to call some JavaScript code after the client side validation is successful and before the page is post back. We can do it easily. In asp.net while client...
View ArticleJavaScript date time localization e.g. central time to other time zone
Recently I had a requirement of doing JavaScript time localization. Problem statement goes like this- "We have some data in central time (CST) in database. This data is basically a Gantt chart data....
View ArticleTo display the webpage again, the web browser needs to resend the information...
To display the webpage again, Internet Explorer needs to resend the information you've previously submitted.If you were making a purchase, you should click Cancel to avoid a duplicate transaction....
View ArticleProgress bar for long running process with steps using asp.net, C#, SignalR
I have come across with many questions regarding implementing progress of some long running operations in asp.net application. And I could not see any way to solve this problem directly in asp.net....
View ArticleExport HTML to excel using jQuery and asp.net
Here we will see how to export a HTML table content to excel using asp.net web form and C# using jQuery. Let’s start with a small piece of code – <h2> Export to excel using jquery</h2><a...
View ArticleExport PDF using jQuery and generic handler in asp.net
Recently I have added a post regarding Export HTML to excel using jQuery and asp.net. Here I am repeating the same for PDF. I will suggest you to go through the previous post as I am not explaining...
View ArticleAsp.net validation add text background color
Following is code for adding background color to the text box if validation fails in asp.net web form- <html xmlns="http://www.w3.org/1999/xhtml"><head...
View ArticleRun some VBA code when excel opens
This is a very simple post describes how to run some code when excel opens. Excel always runs a subroutine named Auto_Open() when excel opens. Simple we can use this subroutine to do the job. Go to...
View ArticleEnterprise Library 6.0: The LogWriter has not been set for the Logger static...
A common approach to create a log entry using the following code- LogEntry entry = new LogEntry();entry.Message = "I am logging";Logger.Write(entry);This works fine with Enterprise Library 5.0. But in...
View ArticleHow to upload multiple records in C# and stored procedure without looping
Recently I come across a question regarding how to save multiple records in sql server using C# and without using any loop. Let’s take a simple case of saving list of persons. Let’s have the following...
View ArticleAccessing derived class properties in the base class public method and...
There are many ORM models that work on Object Relation Mapping. It generates queries on the fly based on the XML config file and reflection. This post is intended to explain a simple scenario of how we...
View ArticleConsuming Microsoft web API from Angular JS application – Cross domain –...
In this post we are going to explore how to consume web API from angular JS application. This is a cross domain call where the web API will reside in a different application than the angular call. We...
View ArticleCreating a mongo DB replica set in windows desktop
I was going through mongo DB online course “M101JS: MONGODB FOR NODE.JS DEVELOPERS” and got stuck on the assignment “HOMEWORK: HOMEWORK 6.5”. As I was working on windows and the steps given was for MAC...
View ArticleSQL like IN clause in RethinkDB
Let’s consider a simple example of product. We need to get all product where product ids in a given list. A product document goes like this- [ {“ID”:0,“Name”:”Bread”,“Description”:”Whole grain...
View ArticleRethinkdb replace multiple fields with object and array as nested field type
I came across a requirement where I need to replace multiple fields in a document. In my case the document has two fields, one as object and other as array. What was needed is modify the nested array...
View ArticleMicrosoft.WebApplication.targets not found with MSBuild for Build Tools for...
Was working with Jenkins integration and was using MSBuild for Build Tools for Visual Studio 2017(which by default gets installed into C:\Program Files (x86)\Microsoft Visual...
View ArticleHow to run fortify scan for dotnet solution using MSBuild
It's simply a 4 stage process. Step 1: Clear previous scan buildsourceanalyzer -b build_id -cleanHere build id is an unique string that represent identification of a particular scan in the system (in...
View ArticleFortify scan with sourceanalyzer using Jenkins - Unable to load build session...
Are you running fortify scan through sourceanalyzer for MSBuild? Are you running it with Jenkins? Jenkins node is running with Windows? May be following a process describe here. Following steps working...
View ArticlejqGrid load data from ASP.NET MVC Core controller
In this post, let's see how to bind jqGrid with data from asp.net core MVC with server-side paging. We are using User details as MVC view model. Here is the ViewModel- public class UserViewModel {...
View ArticlePurse dynamic JSON with C#
First, let me explain what is we are trying to do in this post. Recently have a problem needed to parse a JSON to a C# object. Few of the fields are fixed whereas few are dynamic in nature. Like in the...
View Article