Skip to main content

Posts

Indexes In SQL SERVER in Hindi Part 1

Recent posts

Non Cluster Index in SQL Server

Injecting one controller into another controller in AngularJs

We can use functionality of one controller into another controller Here for injecting one controller into another one we have to use $controller service it will instantiate a controller inside another controller Syntax: app.controller('Cntrl1',  function () {     this.MethodTest = function () {       // functionality     } }); app.controller('Cntrl2', ['$scope', '$controller', function ($scope, $controller) {      var testCtrl= $controller('Cntrl1');      testCtrll.MethodTest(); }]);

Object Oriented Programming in JavaScript

Introduction JavaScript is a prototype-based programming style of object-oriented programming in which classes are not present. It can support OOP because it supports inheritance through prototyping as well as properties and methods. Object Oriented Programming in JavaScript is known as prototype-based programming. Creating Class in JavaScript  the following syntax is used for declaring a class in JavaScript: function Emp() {       alert( 'Emp instantiated' );   }   Here Emp can act as a class in JavaScript.  The body of Emp acts as a constructor and is called as soon as we create an object of the class.   Creating Objects of Emp Class Using the following syntax we can create an object of the Emp class: var Emp1 =  new  Emp();   As soon as we create an object of the Emp class the constructor will be called. Here the above function Emp would be treated as ...

Binding CheckBoxList in ASP.Net MVC

Blogspot Introduction I would like to share how to bind the checkbox list in MVC. I will use a Model (a class file) to define various attributes for checkboxes. For a basic understanding of MVC kindly use the following link: ASP.NET MVC Overview The following is the procedure. 1. Creating Model We created a "SubjectModel" class under the Models folder and defined the following two properties: Subject: to display text Selected: to display check/uncheck 2. Creating the controller We created a Controller "BindingCheckBoxController" under the controllers folder We created an Action having the name = "DisplaycheckBoxes" We created a list of Subjects (Subject model class) Returning a list of subjects to the View. public  ActionResult DisplayCheckboxes() {     List<SubjectModel> listsubject =  new  List<SubjectModel>();     listsubject.Add( new  SubjectModel( "Physics" , true )); ...

Contact Form

Name

Email *

Message *