Advance Sharp

Advance Sharp is derived by its users, provides articles on many languages for helping other users to learn new features and languages. We want to make it the first place for every programmer to learn new technologies by accepting articles from any experienced programmer who want to help other programmer.

We have articles on following topics

Most Viewed Articles

MVC insert update delete and select records

CRUD (Create, Retrieve, Update and Delete) in MVC. When we start to learn new language, first we try to run an application with “Hello World” and then CRUD functionality. So in this article we will see how to select records from database (with WebGrid, pagination and sort functionality), update a record, add new record and finally delete a record in ASP.Net MVC. Let’s create a simple table... By   On

MVC DropDownListFor fill on selection change of another dropdown

Binding DropDownListFor from enum, database and some hard coded values in our previous article [MVC dropdown binding best ways][1]. In this article we will try to bind child Dropdown on selection change of parent Dropdown, say Country to State or Sate to City, by using jQuery which will call an action in controller and return JSON for selected id, and with the help of jQuery append values to... By   On

Search, sort, paging, insert, update and delete with ASP.Net MVC and bootstrap modal popup PART-1

Search, sort, paging, insert, update and delete with ASP.Net MVC and bootstrap modal popup and WebGrid to show records with search, sort and paging feature and in next article we will complete our article by adding insert, update and delete feature with bootstrap modal popup. We are going to use Entity Framework 6 code first model with a very simple table phone. Adding client side sorting and... By   On

Gridview multiple header rows

How to show multirow header in gridview in asp.net? i was searching for this question but could not found any easy way so I decided to try my own and found it is not so difficult. Simply we can use header template and item template and design it according to our requirements. we will see this in action in this article. First let's see what we are going to do, here is the final output which we... By   On

IEnumerable and IEnumerator in C# with real time example

We will discuss here what is IEnumerable, IEnumerator, what are differences between them, where should we use IEnumerable and where to IEnumerator, once we will finish our discussion it will be clear, which one would be best for which situation and why, so let’s see it with example To better understand we will create a list of age List<int> ages = new List<int>(); ages.Add(10); ... By   On

Overloading and Overriding in C# with example

In my early day career in many interviews I asked same question, what is overloading and overriding so decided to write this small article which may help someone. We will see here in detail about the overloading, overriding and then differences between them. --- **Overloading:** --- is the mechanism to have more than one method with same name but with different signature (parameters). A... By   On

Search, sort, paging, insert, update and delete with ASP.Net MVC and bootstrap modal popup PART-2

To add insert, update and delete feature we are going to use bootstrap modal popup with a single JavaScript method to open any partial view as a modal popup and one method to post the data from modal, which can work for entire application. First we will add some code to our layout view to dynamically add the partial view in it and JavaScript file, then we will add code only one for add new... By   On

Ajax Modalpopupextender show hide from code behind and by javascript

In this article we will discuss different way of show and hide (open and close) modal popup by using Ajax ModalPopupExtender, how to open/close a modal popup from code behind in asp.net or by using JavaScript, how to use multiple buttons to hide the modal popup in asp.net etc. Suppose we have a grid view to show the record in tabular format and give functionality to edit a record from grid... By   On

Disable dates in Ajax CalendarExtender

Ajax CalendarExtendar: I found many questions on different sites regarding date range selection in Ajax CalendarExtender, while it is quite simple to bound the range to select from, you can allow all the dates, disable past dates, disable date greater than current date, date should be greater than current date + 1 month, current date to 1 month etc. So let me explain one by one: **For all... By   On

Convert object to json and json to object in C#

In this article we will see how to convert an object to json string or how to convert a json string to an object in C#, we will try to write a generic class with two methods, one for converting an object to json and other for converting json string to an object. I searched internet to get if there is anything like this with .net but could not found any which we can use directly, so let's... By   On

New Articles

Angularjs Validation with CSS and ngMessage with Demo

Angularjs ngMessage validation is so powerful that we can complete our validation without writing any code except two simple CSS class and with great look and feel. By using ngMessage we can give those features which was taking months to wring css and JavaScript but with angularjs it is only the elements settings. In this article we will first try to understand the very simple CSS style then we... By   On

Angularjs directives fundamentals

In AngularJS Directives are html markers on a DOM element like an attribute, element name, comment or CSS class, that tell AngularJS's HTML compiler ($compile) to perform a specified behaviour to that DOM element or even transform the DOM element and its children.Some Example are ngBind, ngModel, and ngClass etc. All the AngularJS pre-defined directives prefix with `ng`. AngularJS allow us to... By   On

Get list of country without database by using RegionInfo Class

RegionInfo class can be used to get the detail of any country and it's other country related information like country name, country code, currency, native name and many more. If we want to bind a drop down with the countries of world without creating database, then it will be the good option. There are many other information which can be used but for this article just we are going to see how we... By   On

Pass value from one controller to another in AngularJS

Share value between two or more controller is easy by using the service which we will see in this article. In ASP.Net there were many options to pass values from one page to other pages, let's just name some of them to understand if we can use them or not. The very first thing comes in mind SESSION state, to use the session state we will to go to the server side, so we will need the service to... By   On

You must know about angularjs

Angularjs has many feature which makes developer life easier specially the way of binding and changing values when there is any change in value automatically. As an Angularjs developer, what are the features we must know before starting coding. Here are some of the features we will discuss in this article 1. Data Binding (one way, two way and one time data binding) 2. Data Binding (one way,... By   On

6 Lesser Known Things about CSS

![alt text][1] CSS keeps updating itself, in a way that you need to keep up with the changing features and tones of this stylesheet. You need to know the new syntax, and also the no-code methods that you can ideally use. Here you will be introduced to some of the lesser known facts of CSS that will help you catch up with the details. **Border-radius with Slash** If you want to define the... By   On

Angularjs Bootstrap Datepicker enable/disable dates with configuration example

Adding calendar to the angularjs application is more than easy to any other application if you configured it properly. Angularjs Bootstrap DatePicker have more features than any other available calendar, you can set all your condition in html from data format to min-date, max-date, date disabled for Saturday and Sunday, first day of the week, todays button text, Week button text, close button... By   On

DateTime vs DateTime2 and conversion exception

DateTime2 is new data type introduced in SQL Server which is nothing but an extension of existing DateTime data type. Question is why we are getting error of 'DateTime vs DateTime2 conversion exception' while we are not using an old version of SQL Server say 2005 or 2008. We will check this in this article and other issues which we face time to time and how to fix them. Let's first see the most... By   On

Angularjs dropdown select value, text, multiple values with demo

Angularjs dropdown/slect have more option than any other .net language dropdownlist, we can bind and get only Id or Text or both from dropdown, even we can bind and get more than two values like value, text and role from a dropdown and even more. We can try to see all the possible ways to bind the dropdown/select in this article, which is not possible to cover every thing but we will try our best... By   On

Creating One Model Multiple Templates in EPiServer

To begin my article on how to create one model for multiple templates, I might start on with describing to you the page template. A template is for generating page outputs of a particular type, sometimes in aspx type of file. The page templates in EPiServer CMS are created using web forms or ASP.NET MVC. Therefore, a page template is created and used for more than one page type. Usually one to... By   On

Angularjs Constant and enum with example

As we know the benefit of constant and enum in any other language, we need to it wherever need in our project. But angularjs does not have any enum concept, we will try to create some constants, object to achieve the same goal of enum easily with example. Luckily AngularJS provides a `constant` service type that can be used for static data that will not change and can be used throughout the... By   On

Maneuver DOM Elements in ASP.Net with JQuery

JQuery, a popular open source JavaScript library, is CSS3 compliant. With JQuery, you can easily maneuver the DOM elements in your web page. Basically, it allows you to add/delete DOM elements to your HTML based content. If you want to manipulate the DOM elements using JQuery and Visual Studio, you basically need to install the following tools to your system 1. Visual Studio 2008 and 2008... By   On