Friday, December 30, 2016

Wednesday, December 28, 2016

Jquery DataTable paging Sorting and Multi search with datepicker in MVC server side

Previously I had shown how to use Jquery DataTable in MVC and Asp.Net


The specified type member 'Date' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported.

As the ERROR says:

The specified type member 'Date' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported.


var CustomersLst = (from a in entities.Customers
    .Where(x => x.FirstName.Contains("VARA") &&
    x.LastName.Contains("REDDY") &&    
    x.JoiningDate.Date >= JDate.Date)    
     FirstName = a.FirstName,
     LastName = a.LastName,
     CreatedDate = a.CreatedDate


Monday, December 26, 2016

Asp.Net MVC with MongoDB

In the Previous Posts I had shown
Now in this post I will show how to Connect with MongoDB using MongoDBCSharpDriver in Asp.Net MVC and retrieve data from MongoDB.


Saturday, December 24, 2016

Error during serialization or deserialization using the JSON JavaScriptSerializer.

Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.

Friday, December 23, 2016

How to Display HTML Tags in BlogPosts

In this Post I will show how to Display HTML tags in the Blog Posts.

To Display the tags just replace them as shown below.

  1. Replace & character with &
  2. Replace < character with &lt;
  3. Replace > character with &gt;

Jquery DataTable in MVC

In the previous Posts I had shown how to use Jquery DataTable plugin in Asp.Net.

In this Post I will show how to populate Items in MVC with multi column search using Jquery DataTable.
To get the out put as shown below I used VS 2015, SQL server, Entity framework  and Jquery DataTable plugin.

OutPut :

Friday, December 16, 2016

How to check mongodb is running or not

In the previous 2 POSTS we had shown

In this post we will show How to Check if MongoDB is running or not

Continuing the above 2 posts....

open command prompt and run the below command as shown below.

Then you can find its Shell Version, Server Version and Running Port.

Run MongoDB as Windows service

In the previous POST we had shown How to install MongoDB in Windows

Now in this post I will show how to ADD MongoDB as Service in windows

Continuing the previous post...

GO to C:\MongoDB,  press "Shift Key and Right Click on Bin Folder",
Select Open command window here in the context menu and use the command as shown below.

MongoDB Installation on Windows

Here I am going to show you, how to Install MongoDB in Windows.

Go to MongoDB download Center as shown in the below link

and select Windows Server 2008 R2 64-bit and later, with SSL support x64 from dropdown and download as shown in the below image.

Thursday, September 1, 2016

Two way Binding in AngularJS

Here I will show you Two way Binding in AngularJS.


Change First and Last names inside the input fields, and the model will change automatically.
Enter First Name:
Enter Last Name:

{{firstname + " " + lastname}}

<!DOCTYPE html>
<script src=""></script>

<div ng-app="myApp" ng-controller="myController">
    Enter First Name: <input ng-model="firstname">
Enter Last Name: <input ng-model="lastname">
    <h1 style="color:green">{{firstname + " "+lastname}}</h1>

var app = angular.module('myApp', []);
app.controller('myController', function($scope) {
    $scope.firstname = "Vara";
    $scope.lastname = "Reddy";    

Sunday, May 8, 2016

Difference between temp Table(#Table) and Table variable(@Table) in sql server

Json String in Sql Server

In this post i will show how to display/Convert Table Rows to JSON String.

Continuing the previous Post Create Temp Table in Sql Server


                "Data": [{
                                "id": 1,
                                "name": "Kiran",
                                "active": 1
                }, {
                                "id": 2,
                                "name": "Ravi",
                                "active": 1


Create Temp Table in Sql Server or Create Temp Table Variable in Sql Server

In this post I will show how to create Temp Table(variable) using @ symbol.

Previously I had shown



Monday, April 25, 2016


Introduction:  In this article i am going to explain the following:

  • Asp.Net MVC pattern. 
  • How MVC works i.e. MVC flow.
  • Goals and Advantages of MVC.

Tuesday, April 12, 2016

Friday, April 8, 2016

Cascading DropDowns in Asp.Net MVC

Here I am going to show Cascading DropDown Lists for Country, State and City in MVC using EntityFrame Work and Linq

Here I am using Visual Studio 2015 with MVC 5 and EntityFramework 6

OutPut :

Create Relationships Between Tables OR Create Foreign Key Relationships

Here I am going to show, how to create multiple tables with relations between tables (Country, State and City)

Method 1: New Tables

create table Country
       ID int identity(1,1) primary key,
       Name nvarchar(500) Not NULL,
       ShortName nvarchar(15)

create table State
       ID int identity(1,1) primary key,
       StateName nvarchar(500) Not NULL,
       CountryID int,
       foreign key (CountryID) references Country(ID)

create table City
       ID int identity(1,1) primary key,
       CityName nvarchar(500) Not NULL,
       StateID int,
       foreign key (StateID) references State(ID)

Method 2: Existing Tables

Wednesday, April 6, 2016

Difference betweeen ASP.NET WebForms and ASP.NET MVC?

Asp.Net Web Form follows traditional event driven development model for creating web applications.
Asp.Net MVC is a light-weight framework that separate an application into three main components i.e. Model, View, Controller (MVC) so it follows MVC pattern based development model for web application development.
ASPX page (.aspx) is tightly coupled with code behind files (aspx.cs/aspx.vb file) .So In Asp.Net web Forms there is no separation of concerns (SOC). So it’s not possible that multiple developers can work on one section i.e. aspx and another on code behind file at same time. So less support for parallel development.
 Asp.Net MVC pattern is loosely coupled and provides very clean separation of concerns (SOC). View and Controller are independent of each other. So one developer can work on Controller, at the same time other on View and third developer can work on Model. This is called parallel development.
Because of this tightly coupled behavior unit testing in Asp.Net Web Forms becomes really difficult.
Each component in Asp.Net MVC can be easily tested because MVC is loosely coupled. So it provides better support for test-driven development (TDD) and Enhances testability.
Asp.Net Web forms doesn't require much prior knowledge of HTML, JavaScript and CSS.
Asp.Net MVC requires detailed knowledge of HTML, JavaScript and CSS.
Asp.Net Web forms provides limited control over HTML, JavaScript and CSS.
With MVC we have full control over HTML, JavaScript and CSS.
Asp.Net Web forms allow rapid application development (RAD) of web applications because of the availability of robust toolbox having lots of web controls and many control libraries.
Asp.Net MVC might be bit slower to develop a project than Web Forms (due to its SOC nature)
In Asp.Net web forms there are ViewState and Postback events. Large viewstate means increase in page size since viewstate is stored in the page itself thus bit slower loading time and performance degrades.
MVC is stateless, so no ViewState and PostBack events so light weight, quick loading time and gain in performance.
URLs are not much SEO friendly (though this is now possible in ASP.NET 4 as well), so affect SEO.
Use of RESTful URLs makes MVC is more suitable to Search Engine Optimization as we can control the URL and the HTML to a greater extent.
ASP.NET Web Forms model follows a Page Life cycle.
Asp.Net MVC doesn't follow Page Life cycle like Web Forms instead request cycle is simple in ASP.NET MVC model.
Asp.Net Web Form have no HTML helpers                 
Asp.Net MVC has HTML helpers
Asp.Net Web forms have rich server controls and ViewState, so developers can develop web applications with minimal HTML and JavaScript skills,thus bit easy to learn.
Because ASP.NET MVC doesn't support server controls, ViewState and event driven programming mode so it is very difficult framework for new developers to learn and work on MVC pattern.
Asp.Net Web Form has Master Pages that provides for consistent look and feels across all the pages of web application.
Asp.Net Web Form has Layouts for consistent look and feels. Default name of the layout is _Layout.cshtml and stored in /Views/Shared folder.
Many server controls provided by visual studio toolbox like GridView and DataList, Repeater etc has easy data binding capabilities so reduces lots of efforts and codes being written.
ASP.NET MVC doesn’t have server controls instead it has html input controls.
Asp.Net allows code re-usability through User Controls.
Asp.Net MVC has Partial Views for the concept code re-usability.
Asp.Net Web forms will be good for small scale applications with limited team size.
Asp.Net MVC will be best suitable and recommended for large-scale applications where different teams are working together.
Asp.Net Web Form is not Open Source
Asp.Net MVC is an Open Source
Asp.Net Web Form Follows Web Form Syntax
Asp.Net MVC follow Custom syntax (Razor as Default)  

Note: Source From Different Sites