+91-90427 10472
         
Dot net training in Chennai

Angularjs CRUD operation with Asp.net MVC

This blogs explains you how to create Angularjs application integrating with Asp.net MVC model.you can also learn how the data is interacted between controller and Service in Angularjs model.Auto search feature is also added in this Angularjs application.
Create a table in local Sql express with below script,

CREATE TABLE [dbo].[EmployeeDetail] (
[EmployeeId] INT IDENTITY (1, 1) NOT NULL,
[EmployeeName] NVARCHAR (MAX) NULL,
[Age] INT NOT NULL,
CONSTRAINT [PK_dbo.EmployeeDetail] PRIMARY KEY CLUSTERED ([EmployeeId] ASC)
);

Create a New Asp.net MVC Project in Visual Studio as below,
File –> New Project

Right click on References and Click Manage Nuget Packets.Install AngularJS in Nuget Packet as shown,

Click on Install. AngularJs scripts will be added as shown in Solution explorer.

Add the below code in BundleConfig.cs,

bundles.Add(new ScriptBundle(“~/bundles/angular”).Include(
“~/Scripts/angular.js”,
“~/Scripts/angular-route.js”
));

Add the below script reference in _Layouts.cshtml,

@Scripts.Render(“~/bundles/angular”)

Create a EmployeeModel.cs class in Model with below code,

[Table(“EmployeeDetail”)]
public class EmployeeModel
{
[Key]
public int EmployeeId { get; set; }
public string EmployeeName { get; set; }
public int Age { get; set; }
}

Replace the User context in AccountModels.cs with the below code,

public class UsersContext : DbContext
{
public UsersContext()
: base(“DefaultConnection”)
{
}
public DbSet<UserProfile> UserProfiles { get; set; }
public DbSet<EmployeeModel> EmployeeDetails { get; set; }
}

Add EmployeeController class file in Controller Folder and add the below,

namespace angularjsCRUDoperation.Controllers
{
public class EmployeeController : Controller
{
private UsersContext db = new UsersContext();
//
// GET: /Employee/Index
public ActionResult Index()
{
return View();
}
public JsonResult GetEmployee()
{
return Json(db.EmployeeDetails.ToList(), JsonRequestBehavior.AllowGet);
}
//
// GET: /Employee/Details/5
public ActionResult Details(int id = 0)
{
EmployeeModel employeedetail = db.EmployeeDetails.Find(id);
if (employeedetail == null)
{
return HttpNotFound();
}
return View(employeedetail);
}
//
// GET: /Employee/Create
public ActionResult Create()
{
return View();
}
//
// POST: /Employee/Create
[HttpPost]
public string Create1(EmployeeModel employeedetail)
{
if (ModelState.IsValid)
{
db.EmployeeDetails.Add(employeedetail);
db.SaveChanges();
return “success”;
}
return “success”;
}
public ActionResult Edit(string id)
{
return View();
}
//
// GET: /Employee/Edit/5
public JsonResult Edit1(string id)
{
EmployeeModel employeedetail = db.EmployeeDetails.Find(Convert.ToInt32(id));
return Json(employeedetail, JsonRequestBehavior.AllowGet);
}
//
// POST: /Employee/Edit/5
[HttpPost]
public string UpdateEmp(EmployeeModel employeedetail)
{
if (ModelState.IsValid)
{
db.Entry(employeedetail).State = EntityState.Modified;
db.SaveChanges();
return “Success”;
}
return “Failure”;
}
//
// GET: /Employee/Delete/5
public ActionResult Delete(int id = 0)
{
EmployeeModel employeedetail = db.EmployeeDetails.Find(id);
if (employeedetail == null)
{
return HttpNotFound();
}
return View(employeedetail);
}
//
// POST: /Employee/Delete/5
[HttpPost, ActionName(“Delete”)]
[ValidateAntiForgeryToken]
public ActionResult DeleteConfirmed(int id)
{
EmployeeModel employeedetail = db.EmployeeDetails.Find(id);
db.EmployeeDetails.Remove(employeedetail);
db.SaveChanges();
return RedirectToAction(“Index”);
}
protected override void Dispose(bool disposing)
{
db.Dispose();
base.Dispose(disposing);
}
}
}

Add Employee folder in Views and create Create.cshtml, Edit.cshtml and Index.cshtml as shown below in
Solution Explorer.

Put below code in Create.cshtml,

@{
ViewBag.Title = “Create”;
}
<h2>Create</h2>
@using (Html.BeginForm())
{
<div ng-app=”empApp” class=”container”>
<div ng-controller=”EmployeeController”>
<div>
<p class=”divHead”>{{Action}} Employee</p>
<table>
<tr>
<td><b>Id</b></td>
<td>
<input type=”text” disabled ng-model=”EmployeeId” />
</td>
</tr>
<tr>
<td><b>Name</b></td>
<td>
<input type=”text” ng-model=”EmployeeName” />
</td>
</tr>
<tr>
<td><b>Age</b></td>
<td>
<input type=”text” ng-model=”Age” />
</td>
</tr>
<tr>
<td colspan=”2″>
<input type=”button” class=”btnAdd” value=”Save” ng-click=”AddUpdateEmployee()” />
</td>
</tr>
</table>
</div>
</div>
</div>
}
<div>
@Html.ActionLink(“Back to List”, “Index”)
</div>
@section Scripts {
@Scripts.Render(“~/bundles/jqueryval”)
@Scripts.Render(“~/employeeclient.js”)
}

Put below code in Edit.cshtml,

@model angularjsCRUDoperation.Models.EmployeeModel
@{
ViewBag.Title = “Edit”;
}
<h2>Edit</h2>
@using (Html.BeginForm()) {
<div ng-app=”empApp” class=”container”>
<div ng-controller=”EditController”>
<div>
<p class=”divHead”>{{Action}} Employee</p>
<table>
<tr>
<td><b>Id</b></td>
<td>
<input type=”text” disabled ng-model=”EmployeeId” />
</td>
</tr>
<tr>
<td><b>Name</b></td>
<td>
<input type=”text” ng-model=”EmployeeName” />
</td>
</tr>
<tr>
<td><b>Age</b></td>
<td>
<input type=”text” ng-model=”Age” />
</td>
</tr>
<tr>
<td colspan=”2″>
<input type=”button” class=”btnAdd” value=”Save” ng-click=”AddUpdateEmployee()” />
</td>
</tr>
</table>
</div>
</div>
</div>
}
<div>
@Html.ActionLink(“Back to List”, “Index”)
</div&gt
@section Scripts {
@Scripts.Render(“~/bundles/jqueryval”)
@Scripts.Render(“~/employeeclient.js”)
}

Put below code in Index.cshtml,

@{
ViewBag.Title = “Index”;
}
<h2>Index</h2>
<p>
@Html.ActionLink(“Create New”, “Create”)
</p>
@section scripts{
@Scripts.Render(“~/employeeclient.js”)
}
<div ng-app=”empApp” class=”container”>
<br />
<br />
<input type=”text” placeholder=”Search Student” ng-model=”searchEmployee” />
<br />
<div ng-controller=”EmployeeController”>
<table class=”table”>
<tr>
<td>Employee id</td>
<td>Employee Name</td>
<td>
Age
</td>
</tr>
<tr ng-repeat=”r in students | filter : searchEmployee”>
<td>{{r.EmployeeId}}</td>
<td>{{r.EmployeeName}}</td>
<td>
{{r.Age}}
</td>
<td>
<input type=”button” ng-click=”editEmployee(r)” class=”btnAdd” value=”Edit” />
</td>
</tr>
</table>
</div>
</div>

Create a js File employeeclient.js in the root of the project and put below code,

var empApp = angular.module(’empApp’, [])
empApp.controller(‘EmployeeController’, function ($scope, EmployeeService) {
getStudents();
function getStudents() {
$scope.students = [];
EmployeeService.getStudents()
.then(function (studs) {
$scope.students = studs.data;
}
, function (error) {
$scope.status = ‘Unable to load customer data: ‘ + error.message;
alert(“failure”);
console.log($scope.status);
});
}
$scope.AddUpdateEmployee = function () {
debugger;
var Employee = {
EmployeeId: $scope.EmployeeId,
EmployeeName: $scope.EmployeeName,
Age: $scope.Age
};
var getAction = $scope.Action;
var getData = EmployeeService.AddEmp(Employee);
getData.then(function (msg) {
getStudents();
alert(msg.data);
$scope.divEmployee = false;
}, function () {
alert(‘Error in adding record’);
});
}
$scope.editEmployee = function (employee) {
debugger;
window.location.href = ‘/Employee/Edit?id=’ + employee.EmployeeId;
}
});
empApp.factory(‘EmployeeService’, [‘$http’, function ($http) {
var EmployeeService = {};
EmployeeService.getStudents = function () {
return $http.get(‘/Employee/GetEmployee’);
};
// Add Employee
EmployeeService.AddEmp = function (employee) {
var response = $http({
method: “post”,
url: “/Employee/Create1”,
data: JSON.stringify(employee),
dataType: “json”
});
return response;
}
return EmployeeService;
}]);
empApp.controller(‘EditController’, function ($scope, EditService) {
var me = getUrlVars()[“id”];
editEmployee(me);
function editEmployee(Id) {
debugger;
// window.location.href = ‘/Employee/Edit?id=’ + Id;
var getData = EditService.getEmployee(Id);
getData.then(function (emp) {
$scope.EmployeeId = emp.data.EmployeeId;
$scope.EmployeeName = emp.data.EmployeeName;
$scope.Age = emp.data.Age;
$scope.Action = “Update”;
$scope.divEmployee = true;
},
function () {
alert(‘Error in getting records’);
});
}
$scope.AddUpdateEmployee = function () {
debugger;
var Employee = {
EmployeeId: $scope.EmployeeId,
EmployeeName: $scope.EmployeeName,
Age: $scope.Age
};
var getAction = $scope.Action;
var getData = EditService.updateEmp(Employee);
getData.then(function (msg) {
alert(msg.data);
$scope.divEmployee = true;
}, function () {
alert(‘Error in adding record’);
});
}
});
empApp.factory(‘EditService’, [‘$http’, function ($http) {
var EditService = {};
// get Employee By Id
EditService.getEmployee = function (employeeID) {
var response = $http({
method: “post”,
url: “/Employee/Edit1”,
params: {
id: employeeID
}
});
return response;
}
// Update Employee
EditService.updateEmp = function (employee) {
var response = $http({
method: “post”,
url: “/Employee/UpdateEmp”,
data: JSON.stringify(employee),
dataType: “json”
});
return response;
}
return EditService;
}]);
// Read a page’s GET URL variables and return them as an associative array.
function getUrlVars() {
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf(‘?’) + 1).split(‘&’);
for (var i = 0; i < hashes.length; i++) {
hash = hashes[i].split(‘=’);
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars;
}

Solution Explorer looks like below,

Run the solution,
OUTPUT as below,



Click below to download the Angularjs crud solution,
https://1drv.ms/u/s!ArddhCoxftkQg9t6X3vBOck_4proJA

AngularJS validation in MVC

Download PDF

Document by Ganesanva@hotmail.com – + 919042710472

Create a database in Sql server with name “aspnet-AngularjsValidation-20170420122930”.
Create a Table in SQL server using below script,

CREATE TABLE [dbo].[Employeedetail] (
[EmployeeId] INT IDENTITY (1, 1) NOT NULL,
[EmployeeName] NVARCHAR (MAX) NULL,
[Age] INT NOT NULL,
[EmailId] NVARCHAR (MAX) NULL,
[Phone] INT DEFAULT ((0)) NOT NULL,
CONSTRAINT [PK_dbo.Employeedetail] PRIMARY KEY CLUSTERED ([EmployeeId] ASC)
);

Create a new Project in Visual Studio as below,

Right click on References and Click Manage Nuget Packets.Install AngularJS in Nuget Packet as shown,

Click on Install. AngularJs scripts will be added as shown in Solution explorer.

Add the below code in BundleConfig.cs,

bundles.Add(new ScriptBundle(“~/bundles/angular”).Include(
“~/Scripts/angular.js”));

Add the below script reference in _Layouts.cshtml,

@Scripts.Render(“~/bundles/angular”)

Create a model class file Employeedetail in Model Folder and put the below code,

[Table(“Employeedetail”)]
public class Employeedetail
{
[Key]
public int EmployeeId { get; set; }
public string EmployeeName { get; set; }
public int Age { get; set; }
public string EmailId { get; set; }
public int Phone { get; set; }
}

Replace the UserContext class in AccountModels to below code,

public class UsersContext : DbContext
{
public UsersContext()
: base(“DefaultConnection”)
{
}
public DbSet<UserProfile> UserProfiles { get; set; }
public DbSet<Employeedetail> Employeedetails { get; set; }
}

Create EmployeeController class in Controllers and put the below code,

public class EmployeeController : Controller
{
private UsersContext db = new UsersContext();
//
// GET: /Employee/Create
public ActionResult Create()
{
return View();
}
[HttpPost]
public string Create1(Employeedetail employeedetail)
{
if (ModelState.IsValid)
{
db.Employeedetails.Add(employeedetail);
db.SaveChanges();
return “success”;
}
return “success”;
}
protected override void Dispose(bool disposing)
{
db.Dispose();
base.Dispose(disposing);
}
}

Create Employee Folder in Views and Create Create.cshtml file, put the below code

@model AngularjsValidation.Models.Employeedetail
@{
ViewBag.Title = “Create”;
}
<h2>Create</h2>
<div ng-app=”mainApp” ng-controller=”employeeController”>
<form name=”employeeForm” novalidate>
<table border=”0″>
<tr>
<td>Employee name:<span style=”color:red”>*</span></td>
<td>
<input name=”name” type=”text” ng-model=”name” required>
<span style=”color: red” ng-show=”employeeForm.name.$dirty && employeeForm.name.$invalid”>
<span ng-show=”employeeForm.name.$error.required”>Employee Name is Mandatory</span>
</span>
</td>
</tr>
<tr>
<td>Age<span style=”color:red”>*</span> </td>
<td>
<input name=”Age” type=”text” ng-model=”Age” required>
<span style=”color: red” ng-show=”employeeForm.Age.$dirty && employeeForm.Age.$invalid”>
<span ng-show=”employeeForm.Age.$error.required”>Employee Age is Mandatory</span>
</span>
</td>
</tr>
<tr>
<td>Email: <span style=”color:red”>*</span> </td>
<td>
<input name=”email” type=”email” ng-model=”email” length=”100″ required>
<span style=”color: red” ng-show=”employeeForm.email.$dirty && employeeForm.email.$invalid”>
<span ng-show=”employeeForm.email.$error.required”>Email is required.</span>
<span ng-show=”employeeForm.email.$error.email”>Invalid email address.</span>
</span>
</td>
</tr>
<tr>
<td>Phone number<span style=”color:red”>*</span>
</td>
<td>
<input type=”text” name=”phone” ng-model=”phone” ng-required=”true” ng-minlength=”10″
ng-maxlength=”10″ />
<span style=”color: red” ng-show=”employeeForm.phone.$dirty && employeeForm.phone.$invalid”>
<span ng-show=”employeeForm.phone.$error.required ||
employeeForm.phone.$error.number”>Valid phone number is required
</span>
<span class=”help-block”
ng-show=”((employeeForm.phone.$error.minlength ||
employeeForm.phone.$error.maxlength) &&
employeeForm.phone.$dirty) “>
phone number should be 10 digits
</span>
</span>
</td>
</tr>
<tr>
<td></td>
<td>
<button ng-disabled=”employeeForm.name.$dirty &&
employeeForm.name.$invalid || employeeForm.Age.$dirty &&
employeeForm.Age.$invalid || employeeForm.email.$dirty &&
employeeForm.email.$invalid || employeeForm.phone.$dirty &&
employeeForm.phone.$invalid ”
ng-click=”AddUpdateEmployee()”>
Submit</button>
</td>
</tr>
</table>
</form>
</div>
<script>
var mainApp = angular.module(“mainApp”, []);
mainApp.controller(’employeeController’, function ($scope, EmployeeService) {
$scope.AddUpdateEmployee = function () {
debugger;
var Employee = {
EmployeeId: 0,
EmployeeName: $scope.name,
Age: $scope.Age,
EmailId: $scope.email,
Phone: $scope.phone
};
var getAction = $scope.Action;
var getData = EmployeeService.AddEmp(Employee);
getData.then(function (msg) {
alert(msg.data);
// $scope.divEmployee = false;
}, function () {
alert(‘Error in adding record’);
});
}
});
mainApp.factory(‘EmployeeService’, [‘$http’, function ($http) {
var EmployeeService = {};
// Add Employee
EmployeeService.AddEmp = function (employee) {
var response = $http({
method: “post”,
url: “/Employee/Create1”,
data: JSON.stringify(employee),
dataType: “json”
});
return response;
}
return EmployeeService;
}]);
</script>
<div>
@Html.ActionLink(“Back to List”, “Index”)
</div>
@section Scripts {
@Scripts.Render(“~/bundles/jqueryval”)
}

The Solution Explorer will looks like below,

Output as below,



On clicking Submit,


Database mdf SQL Express back up will be on App_Data.
Click below to download the solution,
https://1drv.ms/u/s!ArddhCoxftkQg9h1B4IrqJibyFfExQ

Grid view using Angular JS

Document by Ganesanva@hotmail.com – + 919042710472

Create AngularGrid.html as shown below in windows explorer.

Put the below code in AngularGrid.html,

<html ng-app=”myApp”>
<head lang=”en”>
<meta charset=”utf-8″>
<title>Getting Started With ngGrid Example</title>
<link rel=”stylesheet” type=”text/css” href=”ng-grid.min.css” />
<link rel=”stylesheet” type=”text/css” href=”style.css” />
<script type=”text/javascript” src=”http://code.jquery.com/jquery-1.8.2.js”></script>
<script type=”text/javascript” src=”https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js”></script>
<script src=”ng-grid-2.0.11.min.js”></script>
<script type=”text/javascript” src=”main.js”></script>
</head>
<body ng-controller=”MyCtrl”>
<div class=”gridStyle” ng-grid=”gridOptions”>
</div>
</body>
</html>

Create main.js and put the below code,

var app = angular.module(‘myApp’, [‘ngGrid’]);
app.controller(‘MyCtrl’, function($scope) {
$scope.myData = [{EmployeeName: “Sam”, age: 22},
{EmployeeName: “google”, age: 24},
{EmployeeName: “Yahoo”, age: 28},
{EmployeeName: “Bing”, age: 27},
{EmployeeName: “Ram”, age: 26 },
{EmployeeName: “Ganesan”, age: 25},
{EmployeeName: “Raj”, age: 22},
];
$scope.gridOptions = { data: ‘myData’ };
});

Create style.css and Put below code,

.gridStyle {
border: 2px solid rgb(212,212,212);
width: 800px;
height: 400px
}

Download the files ng-grid.min.css,ng-grid-2.0.11.min.js at the end of blog and put it on the same path.
In order to make this code dynamic, we have to give a dynamic JSON value from Database in myData.
Output:

Click here to download the solution,
https://1drv.ms/u/s!ArddhCoxftkQg9dAzVE1LuxbhTk6Aw

Create Search Service application in SharePoint

Document by Ganesanva@hotmail.com – + 919042710472

Go to Central Administration
Navigate to Application Management -> Manage Service Applications
Click on New -> Search Service Application as shown

Fill the Pop up as shown below.


Search Service Application 11 will be created as shown below.

Select the “Search Service Application” and Click on “Manage” in top ribbon.
Next -> Click on Content Sources.

Click on the link “Local SharePoint Sites”.
Type the web application that need to be crawled in the Start Addresses text box.


Click on Create Schedule on Full Crawl.
Enter the schedule details as below.

Click on Create Schedule in Incremental Crawl. Enter the details as below.

Check box the Start Full Crawl of this Content Source.

Click OK.
The site will now get crawled and all the Search content in Content database will be now moved on to the Search database.

Once the Crawling gets completed, the status will change to “Idle”.
Go on to the site that is crawled and in Home page you can find the search box which allows to search based on Crawling.

Enter employee in Search this site text box and press enter.
The search result will be shown as below in “/_layouts/OSSSearchResults.aspx” URL.

It allows to filter the search in various options and allow to create Custom scope for the search within the site collection.

CRUD operation in share point using JSOM

Document by Ganesanva@hotmail.com – + 919042710472

This blogs shows you an example for JavaScript Client side object model.
Create a List “EmployeeList” with below columns,

The List looks like below,

Create a text file “Saveitem.txt” and js file “Saveform.js” in Site Assets as shown below,

Put the below code in Saveitem.txt,

<script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js”></script>
<script type=”text/javascript” src=”/SiteAssets/Saveform.js”>
</script>
<table border=”0″ cellspacing=”2″ cellpadding=”2″>
<tr>
<td>
Employee Name
</td>
<td>
<input type=”text” id=”txtEmpName” />
</td>
</tr>
<tr>
<td>
Employee Age
</td>
<td>
<input type=”text” id=”txtEmpAge” />
</td>
</tr>
<tr>
<td>
</td>
<td>
<input type=”hidden” id=”txtId” />
<input type=”Button” value=”Save” id=”btnSave” onclick=”createItem()” />
<input type=”Button” value=”Update” id=”btnUpdate” onclick=”updateItem()” />
</td>
</tr>
<tr>
<td colspan=”2″>
<table border=”0″ cellspacing=”2″ cellpadding=”2″ id=”tbldata”>
<thead>
<tr>
<td>
Id
</td>
<td>
Employee Name
</td>
<td>
Employee Age
</td>
</tr>
</thead>
<tbody>
</tbody>
</table>
</td>
</tr>
</table>

Put the below code in “Saveform.js”,

$(document).ready(function(){
$(‘#btnUpdate’).hide();
SP.SOD.executeFunc(‘sp.js’, ‘sp.runtime’, retrieveListItems);
});
function editvalue(element)
{
var Id=element.parentNode.parentElement.cells[0].outerText;
var EmpName=element.parentNode.parentElement.cells[1].outerText;
var Age=element.parentNode.parentElement.cells[2].outerText;
$(‘#txtId’).val(Id);
$(‘#txtEmpName’).val(EmpName);
$(‘#txtEmpAge’).val(Age);
$(‘#btnUpdate’).show();
$(‘#btnSave’).hide();
}
function updateItem() {
var context = new SP.ClientContext.get_current();
var web = context.get_web();
var list = web.get_lists().getByTitle(‘EmployeeList’);
var listItem = list.getItemById($(‘#txtId’).val());
listItem.set_item(“Title”, $(‘#txtEmpName’).val());
listItem.set_item(“EmployeeName”, $(‘#txtEmpName’).val());
listItem.set_item(“Age”, $(‘#txtEmpAge’).val());
listItem.update(); //Update the List Item
context.load(listItem);
context.executeQueryAsync(onGetUserNameSuccess, onGetUserNameFail);
}
function createItem() {
var context = new SP.ClientContext.get_current();
var web = context.get_web();
var list = web.get_lists().getByTitle(‘EmployeeList’);
var listCreationInformation = new SP.ListItemCreationInformation(); //Object for creating Item in the List
var listItem = list.addItem(listCreationInformation);
listItem.set_item(“Title”, $(‘#txtEmpName’).val());
listItem.set_item(“EmployeeName”, $(‘#txtEmpName’).val());
listItem.set_item(“Age”, $(‘#txtEmpAge’).val());
listItem.update(); //Update the List Item
context.load(listItem);
context.executeQueryAsync(onGetUserNameSuccess, onGetUserNameFail);
}
function onGetUserNameSuccess() {
$(‘#txtEmpName’).val(”);
$(‘#txtEmpAge’).val(”);
$(‘#btnUpdate’).hide();
$(‘#btnSave’).show();
alert(‘Success’);
retrieveListItems();
}
// This function is executed if the above call fails
function onGetUserNameFail(sender, args) {
alert(‘Failed to get user name. Error:’ + args.get_message());
}
var siteUrl = ‘http://htc:7004/‘;
function retrieveListItems() {
var clientContext = new SP.ClientContext.get_current();
var oList = clientContext.get_web().get_lists().getByTitle(‘EmployeeList’);
var camlQuery = new SP.CamlQuery();
camlQuery.set_viewXml(‘<View><Query></Query></View>’);
this.collListItem = oList.getItems(camlQuery);
clientContext.load(collListItem);
clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
}
function onQuerySucceeded(sender, args) {
var listItemEnumerator = collListItem.getEnumerator();
$(‘#tbldata tbody’).empty();
while (listItemEnumerator.moveNext())
{
var oListItem = listItemEnumerator.get_current();
$(‘#tbldata tbody’).append(‘<tr class=”child”><td>’+oListItem.get_item(‘ID’) +'</td><td>’+oListItem.get_item(‘Title’) +'</td><td>’+oListItem.get_item(‘Age’) +'</td>’+'<td>’+
‘<input type=\”Button\” value=\”Edit\” onclick=\”editvalue(this)\” /></td></tr>’);
}
}
function onQueryFailed(sender, args) {
alert(‘Request failed. ‘ + args.get_message() + ‘\n’ + args.get_stackTrace());
}

Create a page in Site pages library and edit the page,


Put “/SiteAssets/Saveitem.txt” in Content Editor web part.
Output as below,

Click on Save.
Click on Edit.

Click Update.

Click here to download the solution,
https://1drv.ms/u/s!ArddhCoxftkQg9VWsy-V87mHMy6C1g

CRUD operation in SharePoint using Power shell commands

Document by Ganesanva@hotmail.com – + 919042710472

Create a List “EmployeeList” with below columns.

The List looks as below,

Create a power shell script CRUD.ps1 with below code,

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
$web = Get-SPWeb http://htc:7004/
$list = $web.Lists[“EmployeeList”]
$option = Read-Host ‘Enter Option 1.Create item 2.Update item 3.Read item’
if($option -eq 1)
{
#Create a new item
$newItem = $list.Items.Add()
$Title = Read-Host ‘Enter Title’
$EmployeeName = Read-Host ‘Enter Employee Name’
#Add properties to this list item
$newItem[“Title”] = $Title
$newItem[“EmployeeName”] = $EmployeeName
#Update the object so it gets saved to the list
$newItem.Update()
echo ‘item updation Done’
}
if($option -eq 2)
{
#Get all items in this list and save them to a variable
$items = $list.items
$Titlevalue = Read-Host ‘Enter Title value to update’
#Go through all items
foreach($item in $items)
{
#If the “Title” column value equals “My first item!” do something with it
if($item[“Title”] -eq $Titlevalue)
{
$Title = Read-Host ‘Enter Title’
$EmployeeName = Read-Host ‘Enter Employee Name’
#Change the value of the “Title” column
$item[“Title”] = $Title
$item[“EmployeeName”] = $EmployeeName
#Update the item
$item.Update()
}
}
echo ‘item updation Done’
}
if($option -eq 3)
{
$items = $list.items
#Go through all items
foreach($item in $items)
{
write-host “`n”
write-host “Title:”$item[“Title”]
write-host “Employee Name:” $item[“EmployeeName”]
}
}

Open Windows PowerShell ISE from Start menu.

If windows PowerShell ISE not found in start menu do the below steps.
Simply, go and add this feature:
add PowerShell ise: here is the steps:
Open Server Manager
2. Click the Features node
3. Click the Add Features link
4. Check the box for “Windows PowerShell Integrated Scripting Environment”.
5. Click Next, then Install
6. Wait until installation is complete
7. Open PowerShell ISE from Programs>Accessories>PowerShell folder
Open the CRUD.PS1 from File -> Open in Windows PowerShell ISE.

Output as below:
Click on the Play button.

Enter “1”

Click OK.

Click Ok.
The Output windows shows as below,

The item gets added in List as below,

Run again and select the Option “2”.


Checks for Title equals “Bing”


Now the item Bing gets updated to Google in the list.
Run the Script again and enter option “3”.

The output will be printed as below,

Click below to download the solution,
https://1drv.ms/u/s!ArddhCoxftkQg9VV49MnJI30l3tRsA

CRUD Operation using Server object model in Console Application

This Blog helps you to do Server Object model Crud operation in SharePoint 2010 using Managed C# code.
Create a List “Student Details” in Share point as shown below,


Create a new Console Application as shown below,

Click Ok.
Add References in the Solution as shown in Solution Explorer,

Replace the Class Program with the below code,

class Program
{
static void Main(string[] args)
{
string siteUrl = “http://htc:7004/“;
using (SPSite site = new SPSite(siteUrl)) // Site Collection
{
using (SPWeb web = site.OpenWeb()) // Site
{
SPList list = web.Lists[“Student Details”]; // List
SPQuery curQry = new SPQuery();
curQry.Query = “”;
startconsole:
Console.WriteLine(“Enter your Option:”);
Console.WriteLine(“1. Create New item in Student Details List”);
Console.WriteLine(“2. Update item in Student Details List”);
Console.WriteLine(“3. Get list of items in Student Details List”);
Console.WriteLine(“Enter 1 or 2 or 3”);
int optionvalue = Convert.ToInt32(Console.ReadLine());
if (optionvalue == 1)
{
Console.WriteLine(“Enter EStudent Name”);
string EmpName = Console.ReadLine();
Console.WriteLine(“Enter Student Age”);
string Age = Console.ReadLine();
Console.WriteLine(“Enter Student Code”);
string Code = Console.ReadLine();
SPListItem oListItem = list.Items.Add();
oListItem[“Title”] = EmpName;
oListItem[“Student_x0020_Age”] = Age;
oListItem[“Student_x0020_Code”] = Code;
oListItem.Update();
Console.WriteLine(“Inserted successfully”);
}
else if (optionvalue == 2)
{
//Get the Items using Query
SPListItemCollection olistitemcollection = list.GetItems(curQry);
Console.WriteLine(“Id” + “\t” + “Name” + “\t” + “Age” + “\t” + “Code”);
foreach (SPListItem oitem in olistitemcollection)
{
Console.WriteLine(Convert.ToString(oitem[“ID”]).Trim() + “\t” + Convert.ToString(oitem[“Title”]).Trim() + “\t” + oitem[“Student_x0020_Age”] + “\t” + oitem[“Student_x0020_Code”]);
}
Console.WriteLine(“Enter Id to update”);
int id = Convert.ToInt32(Console.ReadLine());
Console.WriteLine(“Enter EStudent Name”);
string EmpName = Console.ReadLine();
Console.WriteLine(“Enter Student Age”);
string Age = Console.ReadLine();
Console.WriteLine(“Enter Student Code”);
string Code = Console.ReadLine();
SPListItem oListItem = list.Items.GetItemById(id);
oListItem[“Title”] = EmpName;
oListItem[“Student_x0020_Age”] = Age;
oListItem[“Student_x0020_Code”] = Code;
oListItem.Update();
Console.WriteLine(“Updated successfully”);
}
else if (optionvalue == 3)
{
Console.WriteLine(“List of items as below”);
SPListItemCollection olistitemcollection = list.GetItems(curQry);
Console.WriteLine(“Id” + “\t” + “Name” + “\t” + “Age” + “\t” + “Code”);
foreach (SPListItem oitem in olistitemcollection)
{
Console.WriteLine(Convert.ToString(oitem[“ID”]).Trim() + “\t” + Convert.ToString(oitem[“Title”]).Trim() + “\t” + oitem[“Student_x0020_Age”] + “\t” + oitem[“Student_x0020_Code”]);
}
}
Console.WriteLine(“Do you want to repeat the option Y/N?”);
string optionresult = Console.ReadLine();
if (optionresult == “Y”)
{
goto startconsole;
}
}
}
}
}

Output as shown below,

Enter Option 3

Enter Y

Enter Option 2

Enter Y and enter Option 1


Click below link to download the solution,
https://1drv.ms/u/s!ArddhCoxftkQg9VMr5BmgrwH2-FzMA

CRUD operation in Client side object model C#.net

Document by Ganesanva@hotmail.com – + 919042710472

This Blog helps you to do CSOM Crud operation in SharePoint 2010 using Managed C# code.
Create a List “Student Details” in Share point as shown below,


Create a new Console Application as shown below,

Click Ok.
Add References in the Solution as shown in Solution Explorer,

Replace the Class Program with the below code,

class Program
{
static void Main(string[] args)
{
string siteUrl = “http://htc:7004/“;
ClientContext clientContext = new ClientContext(siteUrl);
List oList = clientContext.Web.Lists.GetByTitle(“Student Details”);
startconsole:
Console.WriteLine(“Enter your Option:”);
Console.WriteLine(“1. Create New item in Student Details List”);
Console.WriteLine(“2. Update item in Student Details List”);
Console.WriteLine(“3. Get list of items in Student Details List”);
Console.WriteLine(“Enter 1 or 2 or 3”);
int optionvalue = Convert.ToInt32(Console.ReadLine());
if (optionvalue == 1)
{
Console.WriteLine(“Enter EStudent Name”);
string EmpName = Console.ReadLine();
Console.WriteLine(“Enter Student Age”);
string Age = Console.ReadLine();
Console.WriteLine(“Enter Student Code”);
string Code = Console.ReadLine();
ListItemCreationInformation itemCreateInfo = new ListItemCreationInformation();
ListItem oListItem = oList.AddItem(itemCreateInfo);
oListItem[“Title”] = EmpName;
oListItem[“Student_x0020_Age”] = Age;
oListItem[“Student_x0020_Code”] = Code;
oListItem.Update();
clientContext.ExecuteQuery();
Console.WriteLine(“Inserted successfully”);
}
else if (optionvalue == 2)
{
CamlQuery oquery = new CamlQuery();
ListItemCollection oListItemCollection = oList.GetItems(oquery);
clientContext.Load(oListItemCollection);
clientContext.ExecuteQuery();
Console.WriteLine(“Id” + “\t” + “Name” + “\t” + “Age” + “\t” + “Code”);
foreach (ListItem oitem in oListItemCollection)
{
Console.WriteLine(Convert.ToString(oitem[“ID”]).Trim() + “\t” + Convert.ToString(oitem[“Title”]).Trim() + “\t” + oitem[“Student_x0020_Age”] + “\t” + oitem[“Student_x0020_Code”]);
}
Console.WriteLine(“Enter Id to update”);
int id = Convert.ToInt32(Console.ReadLine());
Console.WriteLine(“Enter EStudent Name”);
string EmpName = Console.ReadLine();
Console.WriteLine(“Enter Student Age”);
string Age = Console.ReadLine();
Console.WriteLine(“Enter Student Code”);
string Code = Console.ReadLine();
ListItemCreationInformation itemCreateInfo = new ListItemCreationInformation();
ListItem oListItem = oList.GetItemById(id);
oListItem[“Title”] = EmpName;
oListItem[“Student_x0020_Age”] = Age;
oListItem[“Student_x0020_Code”] = Code;
oListItem.Update();
clientContext.ExecuteQuery();
Console.WriteLine(“Updated successfully”);
}
else if (optionvalue == 3)
{
CamlQuery oquery = new CamlQuery();
ListItemCollection oListItemCollection = oList.GetItems(oquery);
clientContext.Load(oListItemCollection);
clientContext.ExecuteQuery();
Console.WriteLine(“List of items as below”);
Console.WriteLine(“Id” + “\t” + “Name” + “\t” + “Age” + “\t” + “Code”);
foreach (ListItem oitem in oListItemCollection)
{
Console.WriteLine(Convert.ToString(oitem[“ID”]).Trim() + “\t” + Convert.ToString(oitem[“Title”]).Trim() + “\t” + oitem[“Student_x0020_Age”] + “\t” + oitem[“Student_x0020_Code”]);
}
}
Console.WriteLine(“Do you want to repeat the option Y/N?”);
string optionresult = Console.ReadLine();
if (optionresult == “Y”)
{
goto startconsole;
}
}
}

Output as shown below,

Enter Option 1,

Enter Option 3

Enter Option Y

Enter Option 2

Enter N to exit

Click below to download the solution,
https://1drv.ms/u/s!ArddhCoxftkQg9VJ4aFU07BD91QxkA

Planning a Better Career in Life with Dot Net Training Programs

Software training courses are necessary for the students who want to get better jobs in leading companies. They mainly aim at imparting the skills required for a project to complete it on time with high accuracy levels. There are different types of programs available for final year students to nourish their abilities effectively. Dot net is a software framework introduced by Microsoft that aims at enhancing the interactive capability of the websites with synchronized details. It is widely used platform for data access, cryptography, networking communication and other purposes to get desired results. Students willing to become .net expert in their life must focus on attending a training program in a reputed institute for increasing the skills efficiently.

On the other hand, identifying a coaching center is not an easy going job which requires proper research. The internet today provide methods for knowing details of the best dot net training institute in Chennai easily for selecting a course accordingly. This will help in developing the abilities of a student with professional teams for achieving better results. They even offer .net training courses with real- time projects enabling the students to achieve their goals. Most coaching centers cover modern facilities for learning lessons in a comfortable environment to focus more on their objective. In addition to that, they conduct training programs online with experienced teachers for getting more benefits. Dot net coaching is extremely useful for those who want to start a bright career in their life.

Moreover, it plays a significant role in improving the capabilities of working employees to upgrade their knowledge. Different types of programs are available for the students to select a right one depending upon the needs. The .net training in Chennai makes it possible for the freshers to sharpen their skills with highly qualified instructors. It involves various modules allowing the students to gain more exposure. Another advantage of undergoing a training course is that it gives ways for acquiring a certificate at flexible prices. The coaching programs are an ideal one for passing the interview test in reputed companies. Furthermore, they help to learn the lessons with the study materials and expert mentors by addressing essential needs.

Dot net training institute offer courses to students with flexible batch timings to ensure more advantages. It is necessary to know the syllabus and other details of a course before the joining procedure. Dot net training institute in Chennai allows the students to experience a better learning in a comfortable environment. Apart from that, it helps to carry out the tasks correctly by minimizing the errors and mistakes. Dot net course Chennai is a must one for the college students to get placed in various companies with high salaries. It is possible to evaluate the needs of students with the course for making them more effective in a project. The online courses are an ideal choice for those who want to learn the lessons in their home and other places for obtaining a certificate at the earliest.

Create External List using BCS in share point 2010

Open Central Administration in SharePoint.
Go to Application Management -> Manage Service Applications as shown below.

Click on New ->Business Data Connectivity Service

Enter Service Application Name and Click OK.

Business Data Connectivity Service application is created as shown below,

Create New -> Secure Store Service application as shown below,

Enter the name “Secure Store Service” and Click Ok.

Secure Store service is created as shown below.

Business Connectivity service and Secure store service are the prerequisites for Creating BCS in SharePoint.
Open site in SharePoint Designer as shown below.

Open Sql Server and Create a Database StudentDB.
Create a Table EmployeeDB with below Script,

CREATE TABLE [dbo].[EmployeeDB](
[EmployeeID] [int] IDENTITY(1,1) NOT NULL,
[EmployeedName] [text] NULL,
[EmployeedSalary] [float] NULL,
CONSTRAINT [PK_EmployeeDB] PRIMARY KEY CLUSTERED
(
[EmployeeID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

Table Design looks as below,

Go to External Content types option in SPD as shown below,

Click on External Content Type button in Top menu. The designer looks as below,

Click on the option “Click here to discover external data sources and define operations” under External Content Type Operations.
The designer looks as below,

Click on Add Connection.


Click OK.

Right Click on the Table and Select Create all operations as shown below.


Click on Next.

Click on Finish.
Save the Content Type in the Name EmployeeDB as shown below.

Open the SharePoint Site http://htc:7004/ in Browser.
Click on Site Action -> Site Content.
Click on Create.

Click on External List.

Click Create.
Select the Content type from the list.

Click Ok.

Give name as Employee Table and Click on Create.
The Output as below,
External List is created as shown below.



Now the External List allow CRUD Operation.

Dot net CRUD operation with Ms access database

Create a new MS database access file
Save the MS access db as db1.mdb file (Access 2000 Database file format) as shown below.

  • Create a table tblUserDetails in MS access with below columns.


Create a table tblStudentDetails with the below columns.

Create a new windows Application project MsAccessCRUD

Add a windows form AddLoginDetails.cs

Design the form as below,

Replace the AddLoginDetails class file as below,

public partial class AddLoginDetails : Form
{
public AddLoginDetails()
{
InitializeComponent();
}
private void btnLogin_Click(object sender, EventArgs e)
{
System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection();
conn.ConnectionString = @”Provider=Microsoft.Jet.OLEDB.4.0;” +
@”Data source= D:\db1.mdb”;
OleDbCommand cmd = new OleDbCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = @”Insert Into tblUserDetails(UserName,[Password])VALUES(‘”+txtUserName.Text+”‘,'”+txtPassword.Text+”‘)”;
cmd.Connection = conn;
conn.Open();
cmd.ExecuteNonQuery();
System.Windows.Forms.MessageBox.Show(“Record Successfully Created”);
StudentLogin objStudentLogin = new StudentLogin();
objStudentLogin.Show();
this.Hide();
conn.Close();
}
}

Add New form StudentLogin.cs and design as below,

Replace the StudentLogin Class with below code,

public partial class StudentLogin : Form
{
public StudentLogin()
{
InitializeComponent();
}
private void Button2_Click(object sender, EventArgs e)
{
// txtUserName.Text
System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection();
conn.ConnectionString = @”Provider=Microsoft.Jet.OLEDB.4.0;” +
@”Data source= D:\db1.mdb”;
OleDbCommand cmd = new OleDbCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = @”select * from tblUserDetails where Password='” +txtPassword.Text +”‘”;
cmd.Connection = conn;
conn.Open();
OleDbDataReader OleDBDR = cmd.ExecuteReader();
while (OleDBDR.Read())
{
string value= OleDBDR[0].ToString();
System.Windows.Forms.MessageBox.Show(“Login Successful”);
ShowStudentDetails objform = new ShowStudentDetails();
objform.Show();
this.Hide();
}
conn.Close();
}
private void Button1_Click(object sender, EventArgs e)
{
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
AddLoginDetails obj = new AddLoginDetails();
obj.Show();
this.Hide();
}
}

Add a new form ShowStudentDetails.cs and design the form as below,

Replace the ShowStudentDetails.cs class file with below code,

public partial class ShowStudentDetails : Form
{
public ShowStudentDetails()
{
InitializeComponent();
}
private void ShowStudentDetails_Load(object sender, EventArgs e)
{
System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection();
conn.ConnectionString = @”Provider=Microsoft.Jet.OLEDB.4.0;” +
@”Data source= D:\db1.mdb”;
OleDbCommand cmd = new OleDbCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = @”select * from tblStudentDetails”;
cmd.Connection = conn;
conn.Open();
OleDbDataAdapter ada = new OleDbDataAdapter(cmd);
DataSet ds = new DataSet();
ada.Fill(ds);
dgvStudentdetails.DataSource = ds.Tables[0];
conn.Close();
}
}

The solution explorer will look as below,

Replace the connection string for Ms access database before running the solution, now its d:\db1.mdb

The Output as below,

Click on Sign Up,

Click Add.

Ms Access DB as below,

Click below to download the solution,

https://1drv.ms/u/s!ArddhCoxftkQg9NHjhgsr8veFi056A

Maria Academy – Best Dot net Training Institute in Chennai

Maria Academy is highly professionalized and experienced in providing best Dot net training courses in Chennai. Out of all other, why exactly .Net? As a platform, .Net has a lot of advantages over other platforms just like how we an edge over all others providing .Net training courses in Chennai. To list few, .Net allows multiple languages, horizontal scalability, easier interface and consistent Ul practices. With growing scope of .Net in various business functions like CRM, Supply management, Finance, having a grip on .Net is going to be a huge add on to your knowledge hub. Knowing dot net is known to double your chances of getting right into the field. With the growing competition if your hunt for best Dot net training institute has just begun, without any further hesitations, enter our premises for best dot net training and gain multiple advantages.

 

With training comes knowledge and with us it’s experienced and processed knowledge that is going to reach you.  We at Maria Academy are proudly holding a team of highly qualified and experienced faculty team for your best dot net training. Be it basics or ProLevel, we will always ensure you an excellent coverage and training. We are offering you a wonderful opportunity to do your .Net courses with our easily approachable and simple team who have produced brilliant results and have always ensured smoother running of all our training institutes. We believe in providing a quicker and easier understanding and aid your learning process more effectively.

 

We provide a complete course on dot net that prepares you to directly get on to working with dot net with ease and perfection. We also ensure you a trouble-free admission and learning process and a friendly environment for your course period. At Maria Academy your goal becomes our duty, and your betterment becomes our goal. We will tirelessly work to ensure your learning process becomes easier and fruitful for your entry into the most competitive IT field.  For best dot.net training courses and guidance instantly, feel free to reach us at our contact number.

 

We at Maria Academy have committed ourselves to provide best .Net training to ensure you with knowledge and experience. In this busy and huge city, our .Net training institutes are easily accessible and are located at various prime locations. Find our centres for dot net courses in Chennai here. With a very economical budget, you can easily complete your .Net course with added advantages and boost your career and multiply your chances of getting a good entry into Software field. Nothing worth comes easy, but an exception is our offer of dot net courses which comes easy Into your hands and gets your hands earn more and our hands responsible for your development. For further assistance and guidance on .Net, contact us.

MVC Training in Chennai

MVC training in Chennai has evolved by leaps and bounds in the last few years. Normally this course is designed as an 8 to 10 lecturer in a classroom session. There is a hand on lab exercises with the help of a live project which is evaluated by a trainer. To undertake this training you need to choose an institute of repute and the main point is that the learning environment has to be indeed good. They should provide you with a conducive learning environment where you can go on to understand the concepts of MVC in general. The training sessions needs to be a combination of theory and practical in details. It should be flexible and convenient as far as the timings are concerned. The course normally starts to begin with a demo view and an on student review. The instructors need to answer all the doubts of the student.

Real doting training is provided by most of the institutes in case of fresher’s to help them placed in software companies. The students are educated by the professional instructors in such a manner in the domain of Microsoft technologies so that they go on to become experts in this domain. Job assistance re provided to them so that they can stay ahead of the competition. From time to time workshops are conducted in the concept of .net technology. A good institute will not push the students into the course, and they are advised to undertake a free interactive session and then go on to decide which the best course of action is. All their efforts are channelized in the direction on how to go about fulfilling the dreams of the students.

What do you need to know about MVC in general?

MVC Training in Chennai is the best place to incorporate your skills in this domain. You can avail the services hands on of an experienced instructor and training on the latest version of MVC 5.0 is provided. In The focus is on theory and the main advantage of it over the web form is illustrated .Then one gets to know on to how to create a controller and then action. The MVC presentation has to start with some sort of diagram. When you are looking for something you tend to place a request that gets routed to a router. You need to understand the design pattern of MVC and then work on the module of ASP. NET framework and in this process, you tend to have an idea of developing lightweight web applications. You need to ensure that you have a suitable amount of walk thoughts and video tutorials as part of the program. Some of the features of this program are as follows

  • You can modulate using the areas
  • Work and develop areas that tend to be mobile compatible
  • Have a clear cut idea about the benefits of MVC design in comparison to the traditional ASP. NET web forms

 

To undertake the course it is suggested that prior knowledge of HTML is needed.

Create Site Columns, Content Types, Bind content type to list in share point

Document by Vairavan – enquiry@softwaretraininginchennai.com – + 919042710472

Navigate to the Site URL http://htc:7004/

Click on Site Action -> Site Settings

Click on Site Columns in Gallery.

http://htc:7004/_layouts/mngfield.aspx
Click on Create.
Create a Site column with column name StudentName and type as Single Line of Text. Click Ok.

Create Site column Age with Number as DataType.

Create a site column Place with Choice
Chennai
Madurai
Trichy.

Navigate to Site Action –>Site Settings
Click on Site Content Types in Gallery.


Click on Create.Create a site content type with name as StudentDetails and Parent Content Type from as
List Content Type and Parent Content Type as Item.

Click Ok.

Click on Add from Existing Site column.
Select Custom Columns in the dropdown.
Add StudentName,Age,Place to Columns to add.Click on Add.

Click Ok.
Create a Custom List as shown below.

Click on Site Action –> View All site content
Click on Create.
Select Custom List as shown.

Create a List StudentDB.

Click on Create.

Click on List settings. Click on Advanced Settings.

Change Allow Management of Content Types to Yes.

Click Ok.
Click on Add from Existing Site content Types from Content Types Tab.

Select Custom Content Types from Dropdown as shown below.

Select Student Details and Click on Add.
Click on Ok .Now the content Type will be added to List.
Now you can see both content types.

Click on Item Content Type.

Click on Delete this Content Type.

Now you can see only one Content Type associated with the List ie. StudentDetails .


Click on New item in StudentDb List.It shows StudentDetails ContentType.

http://htc:7004/Lists/StudentDB/AllItems.aspx
Click on New Student Details link. The New form appears as below.


Click on Modify View and Add the columns to View.



Click on Ok .Now the view looks as below.

All About Dot Net Courses and Training available in Chennai

The .net courses are gaining in popularity and the developers have been able to create intelligent applications which can go on to integrate with other platforms within a limited time frame. Net training in Chennai has also soared the popularity charts in a big manner. Net is a concept that you would need on your windows PC to run the computer.

One of the main reasons on why you should undertake dot  net training in Chennai is because of the fact that it works out to be one of the popular programming languages that provides everything to be developed and you can go on to employ web based architectural deployment. More and more organizations are on the verge of implementing web services and .net technologies which helps to connect the business on a global platform. Another important aspect is that when you undertake dot net course Chennai you open your world of opportunities and gain employment to some of the top companies in the world.

When you undertake a dot net training institute in Chennai you will have hands on idea about the operating system, the fundamentals of programming along with the object oriented concepts. All the job aspirants who are pursuing graduation in IT or non IT stream who are looking to make the most of the job opportunities can go ahead and pursue this course. Roughly, this course spreads around 2126 hours.

To learn the, best dot net training institute in Chennai, there are some points that you need to give due consideration of sorts. Rather than rely on online training you can resort to the classroom led, instructor training. When there is a face to face interaction the focus not only improves but you are better faced to deal with employment chances. The institute that you should choose needs to have teaching staff with the proven level of experience. There should be a process where the teachers are handpicked and all their skills are tested, before they embark on the journey to provide their knowledge to the students. A good set up will undertake your periodic evaluation from time to time and you will be able to understand on where you stand currently. If you tend to miss any classes they will make arrangements that you attend the alternate classes and cover it up. In case of any doubts that might spring up, the faculty is always there to lend you a helping hand. If the situation permits you can also opt for extra classes and clear your doubts as well.

In the modern day world, with information being part and parcel of our life in a big way, choosing a good institute is an easy task. You just need to type the course name of dot net and a host of names will spring up in front of you. You need to do a research yourself and find out that in terms of value of money the course is right up there.

Send mail to users from gmail account using c#.net

Document by Alagappan -ganesanva@hotmail.com – + 919042710472

Click on File –> New Project in Visual Studio. Enter the solution name as MailUser.

Click OK
Right Click on the Project and add new item.
Add new form with name SendEmail.aspx

Put / Replace the below code in SendEmail.aspx

<!DOCTYPE html>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head runat=”server”>
<title></title>
</head>
<body>
<form id=”form1″ runat=”server”>
<div>
<table border=”0″ cellspacing=”2″ cellpadding=”2″>
<tr>
<td>
Email To
</td>
<td>
<asp:TextBox ID=”txtMailTo” runat=”server”></asp:TextBox>
</td>
</tr>
<tr>
<td>
Subject
</td>
<td>
<asp:TextBox ID=”txtSubject” runat=”server”></asp:TextBox>
</td>
</tr>
<tr>
<td>
Body
</td&gt
<td>
<asp:TextBox ID=”txtBody” runat=”server” TextMode=”MultiLine”></asp:TextBox>
</td>
</tr>
<tr>
<td>
</td>
<td>
<asp:Button ID=”btnSend” runat=”server” Text=”Send” OnClick=”btnSend_Click” />
</td>
</tr>
</table>
</div>
</form>
</body>
</html>

Put / Replace the below code In SendEmail.aspx.cs

public partial class SendEmail : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnSend_Click(object sender, EventArgs e)
{
string result=SendEmailtousers(txtMailTo.Text, txtSubject.Text, txtBody.Text);
Response.Write(result);
}
protected string SendEmailtousers(string toAddress, string subject, string body)
{
string result = “Message Sent Successfully..!!”;
string senderID = WebConfigurationManager.AppSettings[“SenderID”];// use sender’s email id here..
string senderPassword = WebConfigurationManager.AppSettings[“SenderPassword”]; // sender password here…
try
{
SmtpClient smtp = new SmtpClient
{
Host = “smtp.gmail.com”,
Port = 587,
EnableSsl = true,
DeliveryMethod = SmtpDeliveryMethod.Network,
Credentials = new System.Net.NetworkCredential(senderID, senderPassword),
Timeout = 30000,
};
MailMessage message = new MailMessage(senderID, toAddress, subject, body);
message.CC.Add(WebConfigurationManager.AppSettings[“CCMail”]);
smtp.Send(message);
}
catch (Exception ex)
{
result = “Error sending email.!!!””;
}
return result;
}
}

Add the below code in web.config below Connectionstrings tag

<appSettings>
<add key=”SenderID” value=”ganesvija@gmail.com”/>
<add key=”SenderPassword” value=”*****”/>
<add key=”CCMail” value=”ganesanva@hotmail.com”/>
</appSettings>


Replace **** with actual password in key SenderPassword.
Run the solution.

The Output as below,



GMAIL inbox,

Note:
In order to trigger mail from client, Enable this on the From Address Gmail account.
Turn on Allow for Less Secure apps.

https://www.google.com/settings/security/lesssecureapps
Reference:
https://support.google.com/accounts/answer/6010255?hl=en
Click below to download the solution,
https://1drv.ms/u/s!ArddhCoxftkQg7UPuVICB-batxhXag

Real Time Dot Net Training Centers in Chennai

There is a wide market for freshers in software companies, especially in dot net field. Many real time dot net training centers are available in Chennai. Experts in dot net training centers train students in Microsoft technologies to excel in IT sector. Trainers in dot net training centers have more than four years of experience in IT sector. The real time dot net training centers provide three types of services which include dot net training, share point training and web development.  Training on dot net is given to students for job assistance purpose and training is given till the students are familiar with the technology. The training centers give a complete guidance on software development life cycle. Regular workshops on dot net technology have been conducted for students and students have their own choice of choosing timing.

Trainers in dot net training centers provide assistance for Microsoft certification such as Microsoft certified technology specialist for dot net and SQL server. Both online and offline training classes are available for dot net.  Online sessions are conducted via Skype, students can save money and time by adopting online dot net training. The dot net course include dot net architecture, OOPS concept, web and windows application with visual studio, connect Sql server database using ado.net, entity framework. Apart from this dot net training centers give training in web services, deploying dot net applications, to build Asp.net web application with MVC architecture.

Practices on design patterns based on dot net with programming share point 2010 application. C# dot net programming with real time examples and web applications. Dot trainers mainly focus on training people to excel well in dot net to meet world class standards. The real time dot net centers have well equipped classrooms, broad band facilities, course materials. Students can get real time exposure as all trainers are good at their teaching skills. The training centers provide course materials for all students who enroll under the training program, apart from this they also train persons for resume preparation. Experts in real time dot net training centers train persons based on current technology requirement. Based on market strategy students can avail the best options from experts and can develop themselves in dot net technology.

Training batches are small so that trainers give more attention to each individual to train persons to become expert in that field and also they can clarify student doubts. Based on their flexi timing students can avail the training. The trainers in dot net training centers prepare students to face the interview. Apart from coaching they train students from interview point. Students can have both course based training as well as interview based training. Certificates are issued to all the students after their successful completion of the course. The certificates enable the students to get placed in software companies. Students who have been trained by the dot net training centers excel well in programming skills. In addition to this they develop knowledge in software related to dot net applications.

State management in Asp.net

Document by Vairavan – Ganesanva@hotmail.com – +919042710472

There are 2 types of state management
1.Server side
2.Client Side
Client Side

  1. View State
  2. Hidden Fields
  3. Cookies
  4. Query strings

Server Side

  1. Application state
  2. Session state

View state
It allows to maintain the value with in the page
Hidden Fields
It is the control in Asp.net used to store value with in the page. It does not shows visibility in the page.
Cookies
It is the small amount of data stored in client browser session
Query string
IT allows to pass the data from one page to another in the browser URL.
Application state:
Asp.net allows to save values using Application state in HttpApplicationstate class.
Session State:
It allows to store data in the server side using HttpSessionState class.
Create a new Project File –>New Project in Visual studio

Click ok.
Right Click on the solution and Add New Item.
Select Web form and Name GetValues.aspx.

Add one another form as SetValues.aspx
Put / Replace the below HTML in SetValues.aspx

<!DOCTYPE html>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head runat=”server”>
<title></title>
</head>
<body>
<form id=”form1″ runat=”server”>
<div>
<asp:TextBox ID=”txtsessionvalue” runat=”server”></asp:TextBox>
<asp:Button ID=”btnSetSession” runat=”server” Text=”Set Session Value” OnClick=”btnSetSession_Click” />
</div>
</form>
</body>
</html>

Put / Replace the below code in SetValues.aspx.cs

public partial class SetValues : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnSetSession_Click(object sender, EventArgs e)
{
Session[“Uservalue”] = txtsessionvalue.Text;
Response.Redirect(“GetValues.aspx?ID=2”);
}
}

Put / Replace the below HTML in GetValues.aspx

<!DOCTYPE html>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head runat=”server”>
<title></title>
</head>
<body>
<form id=”form1″ runat=”server”>
<div>
<asp:TextBox ID=”txtviewstate” runat=”server”></asp:TextBox>
<asp:Button ID=”btnGetSession” runat=”server” Text=”Get Session” OnClick=”btnGetSession_Click” />
<asp:Button ID=”btnSetViewState” runat=”server” Text=”Set View State” OnClick=”btnSetViewState_Click” />
<asp:Button ID=”btnGetViewState” runat=”server” Text=”Get View State” OnClick=”btnGetViewState_Click” />
<asp:Button ID=”btnGetQuerystringvalue” runat=”server” Text=”Get Query string Value” OnClick=”btnGetQuerystringvalue_Click” />
</div>
</form>
</body>
</html>

Put / Replace the below code in GetValues.aspx.cs

public partial class GetValues : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnGetSession_Click(object sender, EventArgs e)
{
string sessionvalue = (string)Session[“Uservalue”];
Response.Write(“The Session State value is ” + sessionvalue);
}
protected void btnSetViewState_Click(object sender, EventArgs e)
{
ViewState[“data”] = txtviewstate.Text;
}
protected void btnGetViewState_Click(object sender, EventArgs e)
{
string viewstatevalue = (string)ViewState[“data”];
Response.Write(“The view State value is “+viewstatevalue);
}
protected void btnGetQuerystringvalue_Click(object sender, EventArgs e)
{
string QueryStringvalue = (string)Request.QueryString[“ID”];
Response.Write(“The Query string value is ” + QueryStringvalue);
}
}

The Output as below,






Click below to download the solution,
https://1drv.ms/u/s!ArddhCoxftkQg617pH3vPsuhyrHvDA

CRUD operation in PHP with MySQL

Download and install XAMPP from the below url
https://www.apachefriends.org/download.html

Run the Xampp Exe File as below,
xampp-win32-7.0.13-0-VC14-installer.exe

Install XAMPP in the Customised location as below in E:\ drive.
Run Xampp_control.exe from XAMPP folder,

Start Apache and Mysql in XAMPP Control Panel

Click on Admin to redirect to MySQL Page,

Create employeedetails Database by clicking on New.

Click on Create to create database.
Click on New to create a new table.

Click on Save to create a new table.
Put the PHP files in htdocs folder as below,

Create CRUD folder in htdocs.

Create db.php,AddEmployee.php,index.php as shown below in CRUD folder.

Add below code in db.php,

<?php
$servername = “localhost”;
$username = “root”;
$password = “”;
$dbname = “employeedetails”;
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
?>

Code in index.php,

<style type=”text/css”>
</style>
<?php
include(‘db.php’);
?>
<a href=”AddEmployee.php” value=”Create Employee” >Create</a>
<table cellspacing=”5″ cellpadding=”5″>
<tr>
<th>
Employee Id
</th>
<th>
Employee Name
</th>
<th>
Age
</th>
</tr>
<?php
$sql =”select * from employeedata”;
$result1 = $conn->query($sql);
if ($result1->num_rows > 0) {
// output data of each row
while($row = $result1->fetch_assoc())
{
?>
<tr>
<td>
<?php echo $row[“EmpId”]?>
</td>
<td>
<?php echo $row[“EmpName”]?>
</td>
<td>
<?php echo $row[“EmpAge”]?>
</td>
<td>
<a href=”AddEmployee.php?edited=1&id=<?php echo $row[“EmpId”]; ?>”>Edit</a>
</td>
<td>
<a href=””>Delete</a>
</td>
</tr>
<?php
}
}else {
echo 0;
}
?>
</table>

Code in AddEmployee.php as below,

<?php
include(‘db.php’);
$EmployeeID=”;
$EmployeeName=”;
$Age=”;
$Operation=’Create’;
if(isset($_POST[‘btnSave’]))
{
if($_POST[‘txtoperation’] ==”Create”)
{
$EmpId=$_POST[‘txtEmployeeID’];
$EmpName=$_POST[‘txtEmployeeName’];
$Age=$_POST[‘txtAge’];
$sql=”INSERT INTO Employeedata(EmpId, EmpName, EmpAge) VALUES (‘$EmpId’,’$EmpName’,’$Age’)”;
if ($conn->query($sql) === TRUE) {
echo “New record created successfully”;
header(‘Refresh:0; index.php’);
} else {
echo “Error: ” . $sql . “<br>” . $conn->error;
}
}
else
{
$EmpId=$_POST[‘txtEmployeeID’];
$EmpName=$_POST[‘txtEmployeeName’];
$Age=$_POST[‘txtAge’];
$sql=”UPDATE Employeedata SET EmpName=’$EmpName’,EmpAge=’$Age’ WHERE EmpId='{$_GET[‘id’]}'”;
if ($conn->query($sql) === TRUE) {
echo “New record updated successfully”;
header(‘Refresh:0; index.php’);
} else {
echo “Error: ” . $sql . “<br>” . $conn->error;
}
}
}
if(isset($_GET[‘edited’]))
{
$sql =”select * from employeedata where EmpId='{$_GET[‘id’]}'”;
$result1 = $conn->query($sql);
if ($result1->num_rows > 0) {
// output data of each row
if($row = $result1->fetch_assoc())
{
$EmployeeID=$row[“EmpId”];
$EmployeeName=$row[“EmpName”];
$Age=$row[“EmpAge”];
$Operation=”Edit”;
}
}
}
?>
<form action=”” method=”post”>
<table>
<tr>
<td>Employee Id</td>
<td><input type=”text” name=”txtEmployeeID” value=”<?php echo $EmployeeID; ?>” />
<input type=”hidden” name=”txtoperation” value=”<?php echo $Operation; ?>” />
</td>
</tr>
<tr>
<tr>
<td>Student Name</td>
<td><input type=”text” name=”txtEmployeeName” value=”<?php echo $EmployeeName; ?>” /></td>
</tr>
<tr>
<td>Age</td>
<td><input type=”text” name=”txtAge” value=”<?php echo $Age; ?>” /></td>
</tr>
<tr>
<td></td>
<td><input type=”submit” value=”save” name=”btnSave” /></td>
</tr>
</table>
</form>

The Output is as below,

http://localhost/CRUD/index.php

http://localhost/CRUD/AddEmployee.php


http://localhost/CRUD/AddEmployee.php?edited=1&id=2
Click below to download the solution,
https://1drv.ms/u/s!ArddhCoxftkQg6w5Te07v0wqAspR4g

JQuery validation in Asp.net web application

Document by Ganesan – Ganesanva@hotmail.com – + 919042710472

Create a new Asp.net web application using File -> New Project

Solution Explorer looks as below,

Add new page AddEmployee.aspx
Put / replace the below code in AddEmployee.aspx

<html xmlns=”http://www.w3.org/1999/xhtml”>
<head runat=”server”>
<title></title>
<script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js”></script>
<script type=”text/javascript”>
function validate() {
if ($(‘#txtEmployeeName’).val() == “”) {
alert(‘Please enter Employee Name’);
return false;
}
if ($(‘#txtAge’).val() == “”) {
alert(‘Please enter Age’);
return false;
}
var radios = document.getElementsByName(‘Gender’);
var radioselected = ”;
for (var i = 0, length = radios.length; i < length; i++) {
if (radios[i].checked) {
// do whatever you want with the checked radio
radioselected = radios[i].value;
// only one radio can be logically checked, don’t check the rest
break;
}
}
if(radioselected ==””)
{
alert(‘Please select Gender’);
return false;
}
if ($(‘#ddlCity’).val() == “–Select–“) {
alert(‘Please select city’);
return false;
}
return true;
}
</script>
</head>
<body>
<form id=”form1″ runat=”server”>
<div>
<table border=”0″ cellspacing=”2″ cellpadding=”2″>
<tr>
<td>Employee Name
</td>
<td>
<asp:TextBox ID=”txtEmployeeName” runat=”server”></asp:TextBox>
</td>
</tr>
<tr>
<td>Age
</td>
<td>
<asp:TextBox ID=”txtAge” runat=”server”></asp:TextBox>
</td>
</tr>
<tr>
<td>Gender
</td>
<td>
<asp:RadioButton ID=”rbtnMale” runat=”server” GroupName=”Gender” Text=”Male” />
<asp:RadioButton ID=”rbtnFemale” runat=”server” GroupName=”Gender” Text=”Female” />
</td>
</tr>
<tr>
<td>City
</td>
<td>
<asp:DropDownList ID=”ddlCity” runat=”server”>
<asp:ListItem Text=”–Select–” Value=”–Select–“></asp:ListItem>
<asp:ListItem Text=”Chennai” Value=”Chennai”></asp:ListItem>
<asp:ListItem Text=”Madurai” Value=”Madurai”></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td></td>
<td>
<asp:Button ID=”btnSave” runat=”server” Text=”Save” OnClientClick=”return validate();” OnClick=”btnSave_Click” />
</td>
</tr>
</table>
</div>
</form>
</body>
</html>

Replace the below code in AddEmployee.aspx.cs

public partial class AddEmployee : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnSave_Click(object sender, EventArgs e)
{
Response.Write(“Saved Successfully”);
}
}

On clicking Save button ,JQuery validation Fires as below.
The Output is as below,





Note
You can check the Jquery validation using Console in Chrome.

Click below to download the solution,
https://1drv.ms/u/s!ArddhCoxftkQg6orGTGKP9owdu4fbQ

CRUD in ASP.net web application using Stored procedure

Document by Maria Academy – mariatrainingacademy@gmail.com – +919042710472

Create Database in SQL server as below,

Create database StudentDB

Create StudentDetails table using the below script,

CREATE TABLE [dbo].[StudentDetails](
[StudentId] [int] IDENTITY(1,1) NOT NULL,
[StudentName] [varchar](100) NULL,
[Age] [int] NULL
) ON [PRIMARY]

Run the below Stored Procedures in SQL Server,

create Proc [dbo].[Ins_StudentDetails]
@StudentName varchar(100),
@Age int
as
begin
INSERT INTO [StudentDetails]
([StudentName]
,[Age])
VALUES
(@StudentName
,@Age)
create Proc [dbo].[Select_StudentDetails]
as
begin
select * from StudentDetails
end
create Proc [dbo].[Update_StudentDetails]
@StudentId int,
@StudentName varchar(100),
@Age int
as
begin
UPDATE [StudentDetails]
SET [StudentName] = @StudentName
,[Age] = @Age
WHERE StudentId=@StudentId
end

Create a new Asp.net web application CRUDinProcedure as below,
File -> New Project

Click OK.
Solution Explorer as below,

Add new Page AddStudentDetails.aspx
Put / Replace the below code in AddStudentDetails.aspx

<html xmlns=”http://www.w3.org/1999/xhtml”>
<head id=”Head1″ runat=”server”>
<title></title>
</head>
<body>
<form id=”form1″ runat=”server”>
<div>
<table border=”0″ cellspacing=”2″ cellpadding=”2″>
<tr>
<td>
<asp:Label ID=”lblStudentName” runat=”server” Text=”Student Name”></asp:Label>
</td>
<td>
<asp:TextBox ID=”txtStudentName” runat=”server”></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID=”lblAge” runat=”server” Text=”Age”></asp:Label>
</td>
<td>
<asp:TextBox ID=”txtAge” runat=”server”></asp:TextBox>
</td>
</tr>
<tr>
<td></td>
<td>
<asp:Button ID=”btnSubmit” runat=”server” Text=”Submit” OnClick=”btnSubmit_Click” />
<asp:Button ID=”btnUpdate” runat=”server” Text=”Update” OnClick=”btnUpdate_Click” />
<asp:Button ID=”btnClear” runat=”server” Text=”Clear” OnClick=”btnClear_Click” />
<asp:HiddenField ID=”hfId” runat=”server”></asp:HiddenField>
</td>
</tr>
<tr>
<td colspan=”2″>
<asp:GridView ID=”grvStudentDetails” runat=”server” AutoGenerateColumns=”false”>
<Columns>
<asp:BoundField DataField=”StudentId” HeaderText=”StudentId” />
<asp:BoundField DataField=”StudentName” HeaderText=”StudentName” />
<asp:BoundField DataField=”Age” HeaderText=”Age” />
<asp:TemplateField>
<ItemTemplate>
<asp:Button ID=”btnEdit” runat=”server” Text=”Edit” OnClick=”btnEdit_Click” />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>

Replace the below code in AddStudentDetails.aspx.cs,

public partial class AddStudentDetails : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings[“DefaultConnection”].ToString());
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
BindGrid();
}
}
private void BindGrid()
{
btnSubmit.Visible = true;
btnUpdate.Visible = false;
SqlCommand cmd = new SqlCommand(“Select_StudentDetails”, con);
cmd.CommandType = CommandType.StoredProcedure;
SqlDataAdapter ada = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
ada.Fill(ds);
grvStudentDetails.DataSource = ds.Tables[0];
grvStudentDetails.DataBind();
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
con.Open();
SqlCommand cmd = new SqlCommand(“Ins_StudentDetails”, con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(“@StudentName”, SqlDbType.VarChar).Value = txtStudentName.Text;
cmd.Parameters.Add(“@Age”, SqlDbType.Int).Value = txtAge.Text;
int result = cmd.ExecuteNonQuery();
if (result > 0)
{
Response.Write(“Inserted Successfully”);
}
con.Close();
BindGrid();
btnClear_Click(null, null);
}
protected void btnEdit_Click(object sender, EventArgs e)
{
Button btn = (Button)sender;
//Get the row that contains this button
GridViewRow gvr = (GridViewRow)btn.NamingContainer;
hfId.Value = gvr.Cells[0].Text;
txtStudentName.Text = gvr.Cells[1].Text;
txtAge.Text = gvr.Cells[2].Text;
btnSubmit.Visible = false;
btnUpdate.Visible = true;
}
protected void btnUpdate_Click(object sender, EventArgs e)
{
con.Open();
SqlCommand cmd = new SqlCommand(“Update_StudentDetails”, con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(“@StudentId”, SqlDbType.Int).Value = hfId.Value;
cmd.Parameters.Add(“@StudentName”, SqlDbType.VarChar).Value = txtStudentName.Text;
cmd.Parameters.Add(“@Age”, SqlDbType.Int).Value = txtAge.Text;
int result = cmd.ExecuteNonQuery();
if (result > 0)
{
Response.Write(“Updated Successfully”);
}
con.Close();
BindGrid();
btnClear_Click(null, null);
}
protected void btnClear_Click(object sender, EventArgs e)
{
txtStudentName.Text = string.Empty;
txtAge.Text = string.Empty;
hfId.Value = string.Empty;
}
}

Screenshot as below,

The Output will be as below,




Click below to download the solution,
https://1drv.ms/u/s!ArddhCoxftkQg6of7HjHOGOkB8IMXA

Dot Net Training Institute in Chennai

Dot net is a software program developed by Microsoft Corporation that plays a significant role in web development applications. Dot net employees are in great demand over the recent years and many companies recruit them who have undergone a training program. There are several private institutes that organize training classes for college students and working people to shape their skills effectively. However, it is necessary to identify a right one among them for developing the abilities considerably. This will help to start a bright career after completing college studies. There are several sources available for knowing the details of a coaching center in a location. On the other hand, it is essential to make a study on them from the internet for finding a institute accordingly.

Dot net training classes are extremely useful for the beginners who want to get jobs with good salaries in various fields. At the same time, it is advisable to check the prerequisites before choosing a training program. Dot net training institute in Chennai offers programs from basic to advanced levels which ultimately help students to focus more on their objectives. It provides excellent opportunities for the students to learn the lessons with latest concepts. Expert staffs and industry professionals will show ways for enhancing the skills of a student in a comfortable environment. Students can get also interact with them for knowing more about opportunities in various industries to start a bright future. Moreover, it is possible to build the skills with real time projects for getting a certificate with high grades.

Most training institutes organize full time, part time and week end classes for the students with excellent teaching faculties. Moreover, they can choose online classes to study the lessons from anywhere easily. Some even conduct seminars, workshops and conferences in order to evaluate the potentials of students. Dot net course Chennai enables the students to undergo training at affordable rates for reaching next levels. Apart from coaching, it offers job assistance services to students who have successfully finished a course. Anyone interested in knowing more about the programs can attend the introductory sessions in a center for gaining more ideas. This in turn gives ways for increasing the efficiency levels while applying for a job in a company.

It is advisable to select a best dot net training institute in Chennai that provide classes with the updated syllabus. Students can enroll their names in a training course for learning the lessons with industry experts. Fresh graduates will benefit a lot with a training program for achieving goals. One must give importance to the reviews and testimonials before joining in an institute for meeting essential requirements. The main objective of dot net course is to make students to fulfill their dreams. Another advantage is that it helps to become familiar with the applications when seeking jobs in a software company. Training fees are an affordable one enabling the students to develop their abilities with innovative approaches. Dot net training paves ways for seeking jobs in reputed companies with high salaries.

CRUD operation with SharePoint List in Visual web part

Document by Ganesan – Ganesanva@hotmail.com – + 919600370429

  • Create EmployeeList in Sharepoint 2010 site with the below Columns.

    EmployeeName, Age

  • Create a new Visual Web part Project using File –>New Project


Click Ok.
The Solution Explorer will looks as below,

In VisualWebPart1UserControl.ascx Put the below code snippet,

<table border=”0″ cellpadding=”2″ cellspacing=”2″>
<tr>
<td colspan=”2″ style=”color:Green”>
<asp:Label ID=”lblresults” runat=”server”></asp:Label>
</td>
</tr>
<tr>
<td>
Employee Name
</td>
<td>
<asp:TextBox ID=”txtEmployeeName” runat=”server”></asp:TextBox>
</td>
</tr>
<tr>
<td>
Age
</td>
<td>
<asp:TextBox ID=”txtAge” runat=”server”></asp:TextBox>
</td>
</tr>
<tr>
<td>
</td>
<td>
<asp:Button ID=”btnSave” runat=”server” Text=”Save” OnClick=”btnSave_Click” />
<asp:Button ID=”btnUpdate” runat=”server” Text=”Update”
onclick=”btnUpdate_Click” />
<asp:HiddenField ID=”hfId” runat=”server” />
<asp:Button ID=”btnClear” runat=”server” Text=”Clear”
onclick=”btnClear_Click” />
</td>
</tr>
<tr>
<td colspan=”2″>
<asp:GridView ID=”grvEmployeeDetails” runat=”server” AutoGenerateColumns=”false”>
<Columns>
<asp:BoundField DataField=”ID” HeaderText=”ID” />
<asp:BoundField DataField=”EmployeeName” HeaderText=”Employee Name” />
<asp:BoundField DataField=”Age” HeaderText=”Age” />
<asp:TemplateField>
<ItemTemplate>
<asp:Button ID=”btnEdit” runat=”server” Text=”Edit” onclick=”btnEdit_Click” />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</td>
</tr>
</table>


In VisualWebPart1UserControl.ascx.cs put/Replace the below code snippet,

public partial class VisualWebPart1UserControl : UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
BindGrid();
btnSave.Visible = true;
btnUpdate.Visible = false;
}
}
private void BindGrid()
{
using (SPSite site = new SPSite(SPContext.Current.Site.Url)) // Site Collection
{
using (SPWeb web = site.OpenWeb()) // Site
{
SPList list = web.Lists[“EmployeeList”]; // List
SPQuery curQry = new SPQuery();
curQry.Query = “”;
//Get the Items using Query
SPListItemCollection olistitemcollection = list.GetItems(curQry);
DataTable dt = olistitemcollection.GetDataTable();
grvEmployeeDetails.DataSource = dt;
grvEmployeeDetails.DataBind();
}
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
using (SPSite site = new SPSite(SPContext.Current.Site.Url)) // Site Collection
{
using (SPWeb web = site.OpenWeb()) // Site
{
SPList list = web.Lists[“EmployeeList”]; // List
SPListItem oListItem = list.Items.Add();
oListItem[“Title”] = txtEmployeeName.Text;
oListItem[“EmployeeName”] = txtEmployeeName.Text;
oListItem[“Age”] = txtAge.Text;
oListItem.Update();
BindGrid();
lblresults.Text = “Saved Successfully”;
}
}
}
protected void btnEdit_Click(object sender, EventArgs e)
{
Button btn = (Button)sender;
//Get the row that contains this button
GridViewRow gvr = (GridViewRow)btn.NamingContainer;
hfId.Value = gvr.Cells[0].Text;
txtEmployeeName.Text = gvr.Cells[1].Text;
txtAge.Text = gvr.Cells[2].Text;
btnSave.Visible = false;
btnUpdate.Visible = true;
}
protected void btnUpdate_Click(object sender, EventArgs e)
{
using (SPSite site = new SPSite(SPContext.Current.Site.Url)) // Site Collection
{
using (SPWeb web = site.OpenWeb()) // Site
{
SPList list = web.Lists[“EmployeeList”]; // List
SPListItem oListItem = list.Items.GetItemById(Convert.ToInt32(hfId.Value));
oListItem[“Title”] = txtEmployeeName.Text;
oListItem[“EmployeeName”] = txtEmployeeName.Text;
oListItem[“Age”] = txtAge.Text;
oListItem.Update();
BindGrid();
lblresults.Text = “Updated Successfully”;
}
}
}
protected void btnClear_Click(object sender, EventArgs e)
{
txtEmployeeName.Text = string.Empty;
txtAge.Text = string.Empty;
hfId.Value = string.Empty;
lblresults.Text = string.Empty;
btnSave.Visible = true;
btnUpdate.Visible = false;
}
}


Right click on the Project and Click Deploy.
Go to Home Page and Click on Site Actions –>Edit Page
Insert –>Web part in Ribbon.

Select the Web part and click Add.

The Output as below,




Click below to download the solution,
https://1drv.ms/u/s!ArddhCoxftkQg6l3ED81o25f4nzffg

Dot net / SharePoint freelance Consultants in Chennai

Document by Ganesan – Ganesanva@hotmail.com – +919042710472

Given the huge demand for dot net and SharePoint applications today and the growing importance of freelancers across the city, .net and SharePoint freelancers in Chennai have engaged in providing the best available professional coaching in the software applications. The job opportunities for dot net with certification have significantly increased the number of .net freelancers in Chennai. Whether it is for professional or educational purposes, it is advisable to take a Dot net Freelance trainer in Chennai to meet the ever-changing demands of corporates and educational systems.

Hiring a Microsoft certified trainer in Chennai helps with professional coaching on Microsoft technologies such Asp.Net, C#.Net, SQL server etc. And in today’s digitalized world, the virtual presence of the trainers in substantial enough for an expert coaching on the applications. An online Dot net trainer uses the best practices of the industry to ensure dot net and SharePoint solutions meet business and educational needs of contemporary period.
A certified Dot net corporate trainer in Chennai combines the passion for technological innovation and deep platform expertise to ensure that proper training is delivered. The key focus of an online Dot net trainer in Chennai is to equip individuals leverage dot net and SharePoint technologies effectively to meet the professional and educational requirements. Young and dynamic professional and aspiring students can utilize the services of many Dot net part time consultants in Chennai to handle challenging and innovative projects. Further, given the array of opportunities in SharePoint and dot net, career as a Freelance SharePoint developer in Chennai or as an asp.net MVC consultant in Chennai holds a lot of promise for the future.

Today’s competitive market has brought dot net and SharePoint professionals to the forefront. A few years ago, a dot net or a SharePoint consultant in Chennai would have been just another consultant but today dot net and SharePoint developers have defined the career path of many individuals and professional services. Being ahead of the industry and constantly upgrading in the latest versions, dot net and SharePoint developers have been and are the preferred vendors for many corporates and students for their training and educational needs.

Along with a good demonstration of how projects are developed in real-time environment, a Microsoft certified trainer in Chennai imparts confidence and knowledge of technical skills for both freshers and working professionals and also ensures that the sessions are well structured and interactive.

With the shifting expectations of the IT industry and education, the ecosystems of dot net and SharePoint and the range of professionalism exhibited by dot net and SharePoint trainers have become more radical and created excitement and interest in learning more about the applications.

Asp.net MVC Course content

Document by Vairavan – enquiry@softwaretraininginchennai.com – + 919042710472

  1. MVC Architecture
  2. Benefits of Asp.net MVC
  3. Explanation on Model, View and Controller.
  4. Filters in MVC
  5. View models
  6. JQuery and JavaScript
  7. Entity Framework with Asp.net
  8. Code First Approach
  9. Database First Approach
  10. POCO Generator
  11. Data Annotation in MVC
  12. Custom Data Annotation
  13. Textbox, Option button ,List box ,Dropdown controls in MVC
  14. Ajax call in MVC
  15. Dependency Injection
  16. MVC with Bootstrap controls
  17. Layered Architecture in MVC
  18. Working with Areas
  19. Partial Views
  20. Working with Web api
  21. WCF Consumption in ASP.net MVC
  22. Convert Asp.net web application to MVC application
  23. MVC with Angular JS
  24. Sample Project on MVC

Consume Web api Http service in MVC solution

Document by Vairavan – ganesanva@hotmail.com – + 919042710472

Create a MVC solution using Code First Approach MVC Entity framework.
Add a Web Api Controller Class as below,

Look on the WebApiConfig.cs how the Routes are made.

The API URL can be routed as both API/Controller/Id and Api/Controller/Action/Id by registering the Routes in Web api config.
Add the Below code in Api Controller(Used for CRUD),

private UsersContext db = new UsersContext();
// GET api/values
public IEnumerable<StudentDetails> GetallStudents()
{
return db.StudentDbset.ToList();
}
// GET api/values/5
public StudentDetails GetStudents(int id)
{
StudentDetails studentdetails = db.StudentDbset.Find(id);
return studentdetails;
}
[HttpPost]
[ActionName(“Delete”)]
// Post api/values/Delete/5
public string DeleteStudents(int id)
{
StudentDetails studentdetails = db.StudentDbset.Find(id);
db.StudentDbset.Remove(studentdetails);
db.SaveChanges();
return “Deleted”;
}
// POST api/values
[HttpPost]
[ActionName(“Post”)]
public void Post([FromBody]string value)
{
}
// PUT api/values/5
public void Put(int id, [FromBody]string value)
{
}
// DELETE api/values/5
public void Delete(int id)
{
}


Screen clipping taken: 02-09-2016 18:44
The Above Api methods can be accessed using below URL,
http://localhost:16842/api/Values
http://localhost:16842/api/Values/5
http://localhost:16842/api/Values/Delete/5
The data can be returned as JSON,Xml or any other format depends on the attribute.

Create a new HTML page in the Solution as index.html

Put below code in Index.html,

<!DOCTYPE html>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<title>Product App</title>
</head>
<body>
<div>
<h2>All Products</h2>
<ul id=”products” />
</div>
<div>
<h2>Search by ID</h2>
<input type=”text” id=”prodId” size=”5″ />
<input type=”button” value=”Search” onclick=”find();” />
<p id=”product” />
</div>
<script src=”http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.0.3.min.js”></script>
<script>
var uri = ‘/api/values’;
$(document).ready(function () {
// Send an AJAX request
$.getJSON(uri)
.done(function (data) {
// On success, ‘data’ contains a list of products.
$.each(data, function (key, item) {
// Add a list item for the product.
$(‘<li>’, { text: formatItem(item) }).appendTo($(‘#products’));
});
});
});
function formatItem(item) {
return item.studentName + ‘: $’ + item.Age;
}
function find() {
var id = $(‘#prodId’).val();
$.getJSON(uri + ‘/’ + id)
.done(function (data) {
$(‘#product’).text(formatItem(data));
})
.fail(function (jqXHR, textStatus, err) {
$(‘#product’).text(‘Error: ‘ + err);
});
}
</script>
</body>
</html>

Now the MVC Application Works with Controller web api repository and a HTML page.
The output will be,

Click below to download the solution,
https://1drv.ms/u/s!ArddhCoxftkQg6hMmGfATxDIT2rtJw
Reference
http://www.asp.net/web-api/overview/getting-started-with-aspnet-web-api/tutorial-your-first-web-api
http://www.asp.net/web-api/overview/web-api-routing-and-actions/routing-in-aspnet-web-api

POCO Generator to generate Model Class files

Document by Ganesan – Ganesanva@hotmail.com – + 919600370429

Download POCO Generator EXE from the below URL.
It can be used for Reverse Engineering to change DB first approach to Code First Approach.

http://www.codeproject.com/Articles/892233/POCO-Generator
Connect to the DB.

Select the Table that you want to Generate POCO Classes.

You can even generate Required attribute and Error field as EF Code First annotation as highlighted below.

Areas in MVC

Document by Ganesan – ganesanva@hotmail.com – + 919600370429

-Create a MVC Application

Click OK

– Add Connection in web.config file as below,

<connectionStrings>
<add name=”TestConnection” connectionString=”Data Source=(LocalDb)\v11.0;Initial Catalog=TestDB;Integrated Security=True;Pooling=False” providerName=”System.Data.SqlClient” />
</connectionStrings>


Add Area in the solution with name Admin
Create a Table in TestDB with AdminDetails Table as below.

CREATE TABLE [dbo].AdminDetails
(
[AdminId] INT NOT NULL PRIMARY KEY IDENTITY,
[FirstName] VARCHAR(50) NOT NULL,
[Lastname] VARCHAR(50) NOT NULL,
[Email] VARCHAR(50) NULL,
[Password] VARCHAR(50) NULL
)

Create Employee Table in TestDB as below,

CREATE TABLE [dbo].[Employee] (
[AdminId] INT NOT NULL,
[employee name] VARCHAR (100) NULL,
[Age] INT NULL,
[Email] VARCHAR (50) NULL,
PRIMARY KEY CLUSTERED ([AdminId] ASC)
);

Add AdminDetails.cs in Admin Areas model as below,

AdminDetails.Cs snippet as below,

public class AdminDetails
{
[Key]
public int AdminId { get; set; }
public string FirstName { get; set; }
public string Lastname { get; set; }
public string Email { get; set; }
public string Password { get; set; }
}
public class AdminContext : DbContext
{
public AdminContext()
: base(“TestConnection”)
{
}
public DbSet<AdminDetails> AdminDetailsDB { get; set; }
}

Right Click on Controller and Add Controller as below,

Now CRUD operation generated using Scaffolding.
Similarly Add Student Area by Right clicking on the solution and Add Areas.
Add StudentDetails.cs model in the Student Area.

Copy the below snippet in StudentDetails.cs file,

public class StudentDetails
{
[Key]
public int Id { get; set; }
public string StudentName { get; set; }
public int? Age { get; set; }
}
public class StudentContext : DbContext
{
public StudentContext()
: base(“TestConnection”)
{
}
public DbSet<StudentDetails> StudentDetailsDB { get; set; }
}

Add Scaffolding for StudentController as below,

Now the Solution Explorer looks as below,

In AdminAreaRegistration and StudentAreaRegistration we can see the routing for Pages,

The OUTPUT for AREA Pages will be as below,

http://localhost:11837/Admin/Admin/Create

http://localhost:11837/Student/Student/Create
It allows to separate the modules in application development. This also helps for Link Building with relevant keywords.
Click below to download the solution,
https://1drv.ms/u/s!ArddhCoxftkQg6hXj8wspGLO_44ifQ

Windows Application CRUD Operation with ADO.net

Document by Ganesan – Ganesanva@hotmail.com – +919600370429

Create TestDB Database in Server Explorer
Create table UserDetails in TestDB with the below code snippet,

CREATE TABLE [dbo].[UserDetails] (
[UserId] INT IDENTITY (1, 1) NOT NULL,
[UserName] VARCHAR (100) NULL,
[Password] VARCHAR (100) NULL,
[City] VARCHAR (100) NULL,
PRIMARY KEY CLUSTERED ([UserId] ASC)
);


Add the below Connection string in app.config,

<connectionStrings>
<add name=”TestConnection” connectionString=”Data Source=(LocalDb)\v11.0;Initial Catalog=TestDB;Integrated Security=True;Pooling=False” providerName=”System.Data.SqlClient” />
</connectionStrings>


Design Form1 as below,

Textbox Properties
UserName Name – txtUserName
Password Name – txtPassword
City Name – txtCity
Save -btnSave
Show Data Link Name -linkLabel1

Events
btnSave OnClick =btnSave_Click
Show Data Link onClick= linkLabel1_LinkClicked
Add below Namespace in Form1.cs.

Using System.Data.SqlClient;
Using System.Configuration;

Add Reference System.Configuration.DLL in the Project.
In Form1.cs (Replace) put the below Snippet,

public partial class Form1 : Form
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings[“TestConnection”].ConnectionString);
public Form1()
{
InitializeComponent();
}
private void btnSave_Click(object sender, EventArgs e)
{
con.Open();
SqlCommand cmd = new SqlCommand(“insert into UserDetails values(‘”+txtUserName.Text+”‘”+”,'”+txtPassword.Text +”‘,'”+txtCity.Text+”‘)”,con);
int results=cmd.ExecuteNonQuery();
con.Close();
if (results > 0)
{
MessageBox.Show(“Inserted Successfully”);
}
}
private void Clear()
{
txtUserName.Text = string.Empty;
txtPassword.Text = string.Empty;
txtCity.Text = string.Empty;
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
ShowData objShowData = new ShowData();
objShowData.Show();
this.Hide();
}
}

Add ShowData.cs form as below design,

Properties
DataGrid Name – dgvGridData
Update Data Name – lnkUpdate

Events
lnkUpdate Link onClick Event – lnkUpdate_LinkClicked
ShowData Form OnLoad Event – ShowData_Load
Add below Namespace in ShowData .cs.

Using System.Data.SqlClient;
Using System.Configuration;

In ShowData.cs (Replace) put the below Snippet,

public partial class ShowData : Form
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings[“TestConnection”].ConnectionString);
public ShowData()
{
InitializeComponent();
}
private void ShowData_Load(object sender, EventArgs e)
{
SqlCommand cmd = new SqlCommand(“select * from UserDetails”, con);
SqlDataAdapter ada = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
ada.Fill(ds);
dgvGridData.DataSource = ds.Tables[0];
}
private void lnkUpdate_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
UpdateUserData objUpdateUserData = new UpdateUserData();
objUpdateUserData.Show();
this.Hide();
}
}

Add UpdateUserData.cs Form as below Design,

Properties
UserId textbox Name – txtUserId
UserName Textbox -txtUserName
Password Textbox – txtPassword
City Textbox – txtCity
Update button name -btnUpdate
Get Data button Name – btnGet
Clear button Name – btnClear
Show Data Link Name -linkLabel1

Event :
btnUpdate onClick =btnUpdate_Click
btnGet onClick= btnGet_Click
btnClear onClick =btnClear_Click
linkLabel1 onClick – linkLabel1_LinkClicked

Add below Namespace in UpdateUserData .cs.

Using System.Data.SqlClient;
Using System.Configuration;

Put (Replace) the below snippet in UpdateUserData.cs ,

public partial class UpdateUserData : Form
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings[“TestConnection”].ConnectionString);
public UpdateUserData()
{
InitializeComponent();
}
private void btnUpdate_Click(object sender, EventArgs e)
{
con.Open();
SqlCommand cmd = new SqlCommand(“Update UserDetails Set UserName='” + txtUserName.Text + “‘,Password='” + txtPassword.Text + “‘,City='” + txtCity.Text + “‘ where UserId=” + txtUserId.Text, con);
int results = cmd.ExecuteNonQuery();
con.Close();
if (results > 0)
{
MessageBox.Show(“Updated Successfully”);
}
Clear();
}
private void Clear()
{
txtUserId.Text = string.Empty;
txtUserName.Text = string.Empty;
txtPassword.Text = string.Empty;
txtCity.Text = string.Empty;
btnGet.Enabled = true;
}
private void btnGet_Click(object sender, EventArgs e)
{
con.Open();
SqlCommand cmd = new SqlCommand(“select * from UserDetails where UserId=”+txtUserId.Text, con);
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
txtUserName.Text = dr[“UserName”].ToString();
txtPassword.Text = dr[“Password”].ToString();
txtCity.Text = dr[“City”].ToString();
}
con.Close();
btnGet.Enabled = false;
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
ShowData objShowData = new ShowData();
objShowData.Show();
this.Hide();
}
private void btnClear_Click(object sender, EventArgs e)
{
Clear();
}
}

The Output as below,



Table Data as below,

Click below to download the solution,
https://1drv.ms/u/s!ArddhCoxftkQg6khuXmrBnLklntXTA

Consume WCF application in MVC

Document by Ganesan – Ganesanva@hotmail.com – + 919600370429

Create a new MVC application.
Create Connection string in Web.config as below.

<connectionStrings>
<add name=”TestConnection” connectionString=”Data Source=(LocalDb)\v11.0;Initial Catalog=TestDB;Integrated Security=True;Pooling=False” providerName=”System.Data.SqlClient” />
</connectionStrings>

Create StudentDetails.cs Class file as below.

[DataContract]
public class StudentDetails
{
[DataMember]
public int Id { get; set; }
[DataMember]
public string StudentName { get; set; }
[DataMember]
public int? Age { get; set; }
}

Create DBContext.Cs file as below

public class UsersContext : DbContext
{
public UsersContext()
: base(“TestConnection”)
{
}
public DbSet<StudentDetails> studentDbset { get; set; }
}

Create ScafFolding and autogenerate Views and controllers.
Make sure the Code now works in DB first approach. After this we are going to change the
data source to consume From WCF.
Create Service Reference as below,


Click OK. Now the service reference will be added as below,

Replace the Controller methods for CRUD as below,

public ActionResult Index()
{
SampleMVC1.ServiceReference1.Service1Client objService = new ServiceReference1.Service1Client();
List<SampleMVC1.ServiceReference1.StudentDetails> objStudentDetails= objService.GetStudentData();
return View(objStudentDetails);
}
[HttpPost]
public ActionResult Create(SampleMVC1.ServiceReference1.StudentDetails studentdetails)
{
if (ModelState.IsValid)
{
SampleMVC1.ServiceReference1.Service1Client objService = new ServiceReference1.Service1Client();
string result= objService.CreateStudentData(studentdetails);
return RedirectToAction(“Index”);
}
return View(studentdetails);
}
//
// GET: /Student/Edit/5
public ActionResult Edit(int id = 0)
{
SampleMVC1.ServiceReference1.Service1Client objService = new ServiceReference1.Service1Client();
SampleMVC1.ServiceReference1.StudentDetails studentdetails = objService.GetStudentDatabyID(id);
if (studentdetails == null)
{
return HttpNotFound();
}
return View(studentdetails);
}
//
// POST: /Student/Edit/5
[HttpPost]
public ActionResult Edit(SampleMVC1.ServiceReference1.StudentDetails studentdetails)
{
if (ModelState.IsValid)
{
SampleMVC1.ServiceReference1.Service1Client objService = new ServiceReference1.Service1Client();
string result = objService.UpdateStudentData(studentdetails);
return RedirectToAction(“Index”);
}
return View(studentdetails);
}

Replace the view First line I.E model reference to point to Service model

Similar for other pages too.


Now the pages will be like below



Click on the Link below to get the sample solution
https://1drv.ms/u/s!ArddhCoxftkQg6gdCJeDrlqBAJE0vg

Create wcf Application for CRUD operation

Document by Ganesan – Ganesanva@hotmail.com – + 919600370429

-Create StudentDetails Table in Local DB

Right Click on the DB and Click Properties.

Connection String can be seen in Property window.

– Create a new WCF Service Application.
Put the connection string above in Web.config as in Snippet.

<connectionStrings>
<add name=”TestConnection” connectionString=”Data Source=(LocalDb)\v11.0;Initial Catalog=TestDB;Integrated Security=True;Pooling=False” providerName=”System.Data.SqlClient” />
</connectionStrings>


Create StudentDetails.cs Class file as below.

[DataContract]
public class StudentDetails
{
[DataMember]
public int Id { get; set; }
[DataMember]
public string StudentName { get; set; }
[DataMember]
public int? Age { get; set; }
}

Create DBContext.Cs file as below

public class UsersContext : DbContext
{
public UsersContext()
: base(“TestConnection”)
{
}
public DbSet<StudentDetails> studentDbset { get; set; }
}

Open the default interface file IService1.cs

Insert the Snippet as below

[OperationContract]
List<StudentDetails> GetStudentData();
[OperationContract]
string CreateStudentData(StudentDetails objStudentDetails);
[OperationContract]
string UpdateStudentData(StudentDetails objStudentDetails);
[OperationContract]
StudentDetails GetStudentDatabyID(int id = 0);

Implement the below code in Service1.Svc.cs

Code Snippet

public List<StudentDetails> GetStudentData()
{
return db.studentDbset.ToList();
}
public string CreateStudentData(StudentDetails objStudentDetails)
{
db.studentDbset.Add(objStudentDetails);
db.SaveChanges();
return “Added”;
}
public string UpdateStudentData(StudentDetails objStudentDetails)
{
db.Entry(objStudentDetails).State = EntityState.Modified;
db.SaveChanges();
return “Updated”;
}
public StudentDetails GetStudentDatabyID(int id = 0)
{
StudentDetails studentdetails = db.studentDbset.Find(id);
return studentdetails;
}

Run the Service application as below

Click on the Link below to get the sample solution
https://1drv.ms/u/s!ArddhCoxftkQg6gdCJeDrlqBAJE0vg

Linq query with different data sources List, Array and SQL

Document by Ganesan – Ganesanva@hotmail.com – + 919600370429

Create StudentDetails Table in TestDB using the below snippet,

CREATE TABLE [dbo].[StudentDetails] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[StudentName] VARCHAR (50) NULL,
[Age] INT NULL,
[inchargeStudentId] INT NULL,
PRIMARY KEY CLUSTERED ([Id] ASC)
);

– Create a Console Application
Use SQL to Linq Converter,
http://www.sqltolinq.com/
Click on Generate Linq to SQL Model Files,

Browse a Folder and Click on OK.
Click on Generate Linq to SQL Files,


Convert SQL query to Linq as below,

Age> 24 and StudentName contains ‘Sco’

Screen clipping taken: 10-09-2016 19:21
Self Join in Linq


Right click on the table and select Regenerate Model Files.
Insert the connection below in App.config,

<connectionStrings>
<add name=”TestConnection” connectionString=”Data Source=(LocalDb)\v11.0;Initial Catalog=TestDB;Integrated Security=True;Pooling=False” providerName=”System.Data.SqlClient” />
</connectionStrings>

Add StudentDetails.cs and data context file as below,

public class StudentDetails
{
public int Id { get; set; }
public string StudentName { get; set; }
public int? Age { get; set; }
public int? InchargeStudentId { get; set; }
}
public class UsersContext : DbContext
{
public UsersContext(): base(“TestConnection”)
{
}
public DbSet<StudentDetails> studentDbset { get; set; }
}

Insert the below Code snippet in Console,

class Program
{
private static UsersContext db = new UsersContext();
static void Main(string[] args)
{
/* Getting the Student Db Collection from DB */
List<StudentDetails> obj= db.studentDbset.ToList();
foreach (var item in obj)
{
Console.WriteLine(“Student Name” + “\t” + item.StudentName + “\t” + “Age:” + item.Age);
}
/* Getting the Student Db Collection for Age>24 from DB */
Console.WriteLine(“———————————————————-“);
Console.WriteLine(“Printing Age > 24”);
var query =
from StudentDetails1 in db.studentDbset
where
StudentDetails1.Age > 24
select new
{
Id = StudentDetails1.Id,
StudentName = StudentDetails1.StudentName,
Age = StudentDetails1.Age
};
foreach (var r in query)
Console.WriteLine(“Student Name” + “\t” + r.StudentName + “\t” + “Age:” + r.Age);
/* Getting the Student Db Collection for Age>24 from DB */
Console.WriteLine(“———————————————————-“);
Console.WriteLine(“Printing Age > 24 && Student Name contains Sco”);
var query1 =
from StudentDetails1 in db.studentDbset
where
StudentDetails1.Age > 24 &&
StudentDetails1.StudentName.Contains(“Sco”)
select new
{
Id = StudentDetails1.Id,
StudentName = StudentDetails1.StudentName,
Age = StudentDetails1.Age
};
foreach (var r in query1)
Console.WriteLine(“Student Name” + “\t” + r.StudentName + “\t” + “Age:” + r.Age);
/* Getting the Student Db Collection for getting Incharge on Self join from DB */
Console.WriteLine(“———————————————————-“);
Console.WriteLine(“Printing self join for Students Lead”);
var query2 =
from s in db.studentDbset
join s1 in db.studentDbset on new { InchargeStudentId = s.InchargeStudentId.Value } equals new { InchargeStudentId = s1.Id }
select new
{
s.Id,
s.StudentName,
s.Age,
incharge = s1.StudentName
};
foreach (var r in query2)
Console.WriteLine(“Student Name” + “\t” + r.StudentName + “\t” + “Age:” + r.Age + “\t” + “Incharge:” + r.incharge);
/* Getting the Collection from DB */
Console.WriteLine(“———————————————————-“);
Console.WriteLine(“Printing from Array”);
string[] ary = new string[] { “Jan”, “Feb”, “Mar”, “Apr”, “May”, “Jun”, “Jul”, “Aug”, “Sep”, “Oct”, “Nov”, “Dec” };
var res = from months in ary
where months.StartsWith(“J”)
select new { MonthStartWith_J = months };
foreach (var r in res)
Console.WriteLine(“Month:” + “\t” + r.MonthStartWith_J);
/* Getting the Collection from DB */
Console.WriteLine(“———————————————————-“);
Console.WriteLine(“Printing from Collection”);
List<string> objstring = new List<string>();
objstring.Add(“Yahooo”);
objstring.Add(“Google”);
objstring.Add(“HCL”);
var obj1 = from company in objstring where company.StartsWith(“Goo”)
select new { companyStartWith_Goo = company };
foreach (var r in obj1)
Console.WriteLine(“Month:” + “\t” + r.companyStartWith_Goo);
Console.ReadLine();
}
}

The Output as below,

Screen clipping taken: 10-09-2016 21:34
Click below for download,
https://1drv.ms/u/s!ArddhCoxftkQg6hZlD6medX1rPn9pw
Reference
http://www.dotnetlearners.com/linq/linq-to-string-array-with-example.aspx

Asp.net Validation Controls

Document by Ganesan  -ganesanva@hotmail.com – + 919600370429
List of Asp.net Validation available are as follows,

1.Required Field validator
2.Regular Expression validator
3.Range Validator
4.Custom Validator
5.Compare Validator

Create a new Asp.net Web application
File -> New Project
b2-1
Right click on the solution and Add New web form page AddStudentDetails.aspx as below,
b2-2
Replace the HTML Tag in  AddStudentDetails.aspx with below snippet,

<html xmlns=”http://www.w3.org/1999/xhtml”>
<head runat=”server”>
<title></title>
</head>
<body>
<form id=”form1″ runat=”server”>
<div>
<table border=”0″ cellspacing=”2″ cellpadding=”2″>
<tr>
<td>Student Name
</td>
<td>
<asp:TextBox ID=”txtStudentName” runat=”server”></asp:TextBox>
<asp:RequiredFieldValidator ID=”RQStudentName” runat=”server” ControlToValidate=”txtStudentName” ErrorMessage=”Please enter Student Name” ForeColor=”Red”>
</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td> Date of Birth
</td>
<td>
<asp:TextBox ID=”txtDOB” runat=”server”></asp:TextBox>
<asp:RangeValidator ID=”Rvalid” runat=”server”
ControlToValidate=”txtDOB” ErrorMessage=”Date of Birth should not be greater than current date” Type=”Date” ForeColor=”Red”></asp:RangeValidator>
</td>
</tr>
<tr>
<td> Age
</td>
<td>
<asp:TextBox ID=”txtAge” runat=”server”></asp:TextBox>
<asp:RequiredFieldValidator ID=”RqAge” runat=”server” ControlToValidate=”txtAge” ErrorMessage=”Please enter Student Age”  ForeColor=”Red”>
</asp:RequiredFieldValidator>
<asp:RangeValidator ID=”RgAge” runat=”server”  ControlToValidate=”txtAge”  ErrorMessage=”Age should be greater than 18″ MinimumValue=”18″ ForeColor=”Red”
MaximumValue=”2000″ Type=”Integer”></asp:RangeValidator>
</td>
</tr>
<tr>
<td> City
</td>
<td>
<asp:DropDownList ID=”ddlCity” runat=”server”>
<asp:ListItem Text=”–Select–” Value=”–Select–“></asp:ListItem>
<asp:ListItem Text=”Chennai” Value=”Chennai”></asp:ListItem>
<asp:ListItem Text=”Madurai” Value=”Madurai”></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID=”RqCity” runat=”server” InitialValue=”–Select–” ControlToValidate=”ddlCity”
ErrorMessage=”Please enter Student City” ForeColor=”Red”>
</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td> Email Id
</td>
<td>
<asp:TextBox ID=”txtEmailId” runat=”server”></asp:TextBox>
<asp:RequiredFieldValidator ID=”RqEmailId” runat=”server” ControlToValidate=”txtEmailId” ErrorMessage=”Please enter Email ID”  ForeColor=”Red”>
</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID=”REVEmailId” runat=”server” ErrorMessage=”please enter correct email id” ControlToValidate=”txtEmailId”
ValidationExpression=”\w+([-+.’]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*” ForeColor=”Red”></asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td> User Name
</td>
<td>
<asp:TextBox ID=”txtUserName” runat=”server”></asp:TextBox>
<asp:RequiredFieldValidator ID=”RequiredFieldValidator1″ runat=”server” ControlToValidate=”txtUserName” ErrorMessage=”Please enter UserName”
ForeColor=”Red”>
</asp:RequiredFieldValidator>
<asp:CustomValidator ID=”CVUserName” runat=”server” ControlToValidate=”txtUserName” OnServerValidate=”CVUserName_ServerValidate”
ErrorMessage=”UserName should not be greater than 15 digits” ForeColor=”Red”></asp:CustomValidator>
</td>
</tr>
<tr>
<td> Password
</td>
<td>
<asp:TextBox ID=”txtPassword” runat=”server” TextMode=”Password”></asp:TextBox>
<asp:RequiredFieldValidator ID=”RequiredFieldValidator2″ runat=”server” ControlToValidate=”txtPassword” ErrorMessage=”Please enter Password”  ForeColor=”Red”>
</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td> Retype Password
</td>
<td>
<asp:TextBox ID=”txtRetypePassword” runat=”server” TextMode=”Password”></asp:TextBox>
<asp:RequiredFieldValidator ID=”RequiredFieldValidator3″ runat=”server” ControlToValidate=”txtRetypePassword” ErrorMessage=”Please enter Retype Password”  ForeColor=”Red”>
</asp:RequiredFieldValidator>
<asp:CompareValidator ID=”cmpPasswordmatch” runat=”server” ControlToCompare=”txtPassword” ControlToValidate=”txtRetypePassword”
ErrorMessage=”Password and Retype Password should not match” ForeColor=”Red”>
</asp:CompareValidator>
</td>
</tr>
<tr>
<td></td>
<td>
<asp:Button ID=”btnSave” runat=”server” Text=”Save” CausesValidation=”true” OnClick=”btnSave_Click” />
</td>
</tr>
</table>
</div>
</form>
</body>
</html>

Replace the AddStudentDetails.cs class with the below snippet,

public partial class AddStudentDetails : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Rvalid.MinimumValue = DateTime.MinValue.ToString(“dd-MM-yyyy”);
Rvalid.MaximumValue = DateTime.Now.ToString(“dd-MM-yyyy”);
}
protected void CVUserName_ServerValidate(object source, ServerValidateEventArgs args)
{
args.IsValid = (args.Value.Length < 15);
}
protected void btnSave_Click(object sender, EventArgs e)
{
if (Page.IsValid)
{
Response.Write(“Saved”);
}
}
}

The Output as below,
b2-3
b2-4
b2-5
Custom Validation on server event,
b2-6
Click below to download the solution,
https://1drv.ms/u/s!ArddhCoxftkQg6kmic1tyrHNsIbXqA

Asp.net CRUD operation with Ado.net

Document by Ganesan  – Ganesanva@hotmail.com – + 919600370429

– Create Database in SQL as “StudentDB”
– Create Table “StudentDetails” with the below snippet,

CREATE TABLE [dbo].[StudentDetails] (
[Id]          INT          IDENTITY (1, 1) NOT NULL,
[StudentName] VARCHAR (50) NULL,
[Age]         INT          NULL,
PRIMARY KEY CLUSTERED ([Id] ASC)
);

You can see the DB created in local SQL express as below,
1
– Create a new Asp.net Web forms Application as below
File –> New Project
2
Add the Connection string in Web.config as below snippet,

 <connectionStrings>
<add name=”DefaultConnection” providerName=”System.Data.SqlClient” connectionString=”Data Source=(localdb)\v11.0;Initial Catalog=StudentDB;Integrated Security=True;Connect Timeout=15;Encrypt=False;TrustServerCertificate=False” />
</connectionStrings>

3
Add new Page as AddStudentDetails.aspx as below,
4
Replace the Below HTML code in AddStudentDetails.aspx file as below,

<html xmlns=”http://www.w3.org/1999/xhtml”>
<head runat=”server”>
<title></title>
</head>
<body>
<form id=”form1″ runat=”server”>
<div>
<table border=”0″ cellspacing=”2″ cellpadding=”2″>
<tr>
<td>
<asp:Label ID=”lblStudentName” runat=”server” Text=”Student Name”></asp:Label>
</td>
<td>
<asp:TextBox ID=”txtStudentName” runat=”server”></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID=”lblAge” runat=”server” Text=”Age”></asp:Label>
</td>
<td>
<asp:TextBox ID=”txtAge” runat=”server”></asp:TextBox>
</td>
</tr>
<tr>
<td></td>
<td>
<asp:Button ID=”btnSubmit” runat=”server” Text=”Submit” OnClick=”btnSubmit_Click” />
<asp:Button ID=”btnUpdate” runat=”server” Text=”Update” OnClick=”btnUpdate_Click” />
<asp:Button ID=”btnClear” runat=”server” Text=”Clear” OnClick=”btnClear_Click” />
<asp:HiddenField ID=”hfId” runat=”server”></asp:HiddenField>
</td>
</tr>
<tr>
<td colspan=”2″>
<asp:GridView ID=”grvStudentDetails” runat=”server” AutoGenerateColumns=”false”>
<Columns>
<asp:BoundField DataField=”Id” HeaderText=”Id” />
<asp:BoundField DataField=”StudentName” HeaderText=”StudentName” />
<asp:BoundField DataField=”Age” HeaderText=”Age” />
<asp:TemplateField>
<ItemTemplate>
<asp:Button ID=”btnEdit” runat=”server” Text=”Edit” OnClick=”btnEdit_Click” />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>

Replace the AddStudentDetails.aspx.cs file as below,

  public partial class AddStudentDetails : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings[“DefaultConnection”].ToString());
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
BindGrid();
}
}
private void BindGrid()
{
btnSubmit.Visible = true;
btnUpdate.Visible = false;
SqlCommand cmd = new SqlCommand(“Select * from StudentDetails”, con);
SqlDataAdapter ada = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
ada.Fill(ds);
grvStudentDetails.DataSource = ds.Tables[0];
grvStudentDetails.DataBind();
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
con.Open();
SqlCommand cmd = new SqlCommand(“insert into StudentDetails values(‘”+txtStudentName.Text+”‘,”+txtAge.Text+”)”, con);
int result=cmd.ExecuteNonQuery();
if (result > 0)
{
Response.Write(“Inserted Successfully”);
}
con.Close();
BindGrid();
btnClear_Click(null, null);
}
protected void btnEdit_Click(object sender, EventArgs e)
{
Button btn = (Button)sender;
//Get the row that contains this button
GridViewRow gvr = (GridViewRow)btn.NamingContainer;
hfId.Value = gvr.Cells[0].Text;
txtStudentName.Text = gvr.Cells[1].Text;
txtAge.Text = gvr.Cells[2].Text;
btnSubmit.Visible = false;
btnUpdate.Visible = true;
}
protected void btnUpdate_Click(object sender, EventArgs e)
{
con.Open();
SqlCommand cmd = new SqlCommand(“Update StudentDetails set StudentName='” + txtStudentName.Text + “‘,Age=” + txtAge.Text + ” where Id=”+hfId.Value, con);
int result = cmd.ExecuteNonQuery();
if (result > 0)
{
Response.Write(“Updated Successfully”);
}
con.Close();
BindGrid();
btnClear_Click(null, null);
}
protected void btnClear_Click(object sender, EventArgs e)
{
txtStudentName.Text = string.Empty;
txtAge.Text = string.Empty;
hfId.Value = string.Empty;
}
}

Run the solution.
The Output will be below,
5
6
Click below to download the solution,
https://1drv.ms/u/s!ArddhCoxftkQg6h98mZAX_-Zv-6reQ

Identifying Dot Net Coaching Institutes in Chennai for Shaping the Skills

Dot net training is an essential one for those who get jobs in leading IT companies and other firms with better salaries. There are many organizations that recruit employees based on their experience and skills. Some even conduct tests for analyzing the potentials of a job seeker. It is an essential one to undergo a training program in a leading institute for shaping the potentials efficiently. However, it is necessary to find a right training center properly for choosing a course depending upon the needs. The internet is a best platform for this purpose because it helps to compare the services offered by various institutes easily. With dot net coaching, it is possible to develop the potentials to reach high levels in career.

 

Most training centers organize the classes based on the requirements of a person to shape his or her abilities with excellence. Besides that, they focus more on conduct the program with industry experts and live projects for achieving better results. Dot not training in Chennai is a suitable for students, job seekers and employees to develop their skills at different levels. It gives ways for learning the lessons in a comfortable environment to meet exact needs. Apart from that, it contributes a lot in augmenting the programming and other potentials with expert teaching faculties. Anyone interested in knowing more about the coaching classes can get ideas from a counselor for selecting a program which perfectly suits their requirements.

 

Some institutes even assist the students to apply for the jobs in reputed companies. On the other hand, it is necessary to go through the testimonials and reviews before choosing a course in a center. This will help a lot for learning the lessons in a comfortable environment. Different types of coaching programs are available for the students to augment their abilities. Dot net training institute in Chennai mainly aims at developing self confidence levels of students with different types of tasks. In fact, it gives ways for analyzing their skills with theory and practice classes. Satisfaction guarantee is the primary aim of a coaching center in Chennai while offering services to students. Online training is also available for those who want to augment their skills anywhere.

 

Dot net training is a perfect one for both employees and employers to complete a project with more accuracy. They can learn more about problem solving techniques to gain more benefits. It is an important one to consider certain important facts before choosing an institute. Study materials offered by the institutes are extremely useful for ensuring desired outputs when executing a new project. Many training institutes allow students to pay their fees with flexible options. Besides that, they conduct exams for the students to correct their mistakes as soon as possible. It is possible to learn more about the training programs from the internet for seeking admission into a right one. The students can undergo coaching classes in a center with the latest computer applications for meeting essential needs in the learning procedure.

Best Dot Net Training Institute in Chennai

Microsoft.net preparing can gain from your preferred dot net training institute in Chennai. The need to comprehend the general working can be clarified in this article. Microsoft confirmation matters a considerable measure when you are searching for a course like this one. The sole reason is on the grounds that the course is bit excessive and included details. You should be clear in your nuts and bolts before you dive in such confirmation. The foundation through which you plan to finish this course ought to likewise be known. One little wrong move can make enormous issues for your vocation.

Utilization of web should be possible to discover the dot net training in Chennai . There are various dot net training institute in Chennai through which you can take in this course. You have to research well concerning such prerequisites; there are sites of the establishments which offer such courses. Check these sites to know subtle elements like course information, charges, timings, choices of classes and learning. Points are imperative with regards to learning net instructional class. Check if the course has every one of the points or not, this will give you greatest inclination as far as thinking about the course.

You have to check as to notoriety in the best dot net training institute in Chennai. This should be possible when by checking the ex-understudies remarks on the site of the establishment. On the off chance that you get the chance to see negative and discourteous remarks then it’s ideal to see some other organization. Extra data can be picked up by reaching the understudies on the off chance that they have said their contact number. Each coin has two sides so it’s not going to be green the distance. Minor issues will keep on being available yet can be overlooked when your needs are set.

.net training in Chennai installment choices are likewise present when you wish to apply. On the off chance that you are making the complete installment in one go then expect some rebate on your last sum. If not this then there would be extra which can help in future learning. This sort of procedure is seen in a large portion of the .net training in Chennai.

Arrangement alternatives are likewise there that can give you the ideal help in your vocation. Finishing Microsoft.net preparing in this manner ends up being gainful and key over the long haul. You would have the ideal vocation in IT field. Continuously explore well with regards to online courses so you get most extreme advantages over the long haul.

Programming codes are not physical items. We can’t see the codes, yet the client can utilize the consequences of a running a coded program as a product application. The product applications so created have reclassified our ordinary encounters and made life so natural, be it controlling a flight or purchasing basic needs from a store. Learning dot net course chennai is along these lines a superb street to pick up livelihood and enhance a man’s vocation profile.

Looking for Dot Net Training in Chennai?

Today, dot net professionals are in great demand and many companies are willing to recruit them with high salaries. Dot net is a software framework used for a variety of applications to maintain accuracy levels. It plays a vital role in web development, communication, data access and other areas for carrying out a project work with more efficiency. There are several software training institutes that organize dot net classes for those who want to enhance their levels. On the other hand, it is an important one to evaluate them from the internet for identifying a right center accordingly. The dot net training programs mainly focus on increasing the programming, problem solving, analytic and other skills of job seekers with excellence.

It is also a suitable one for the employees to develop their abilities effectively to implement the latest techniques in the programming side. Dot net training in Chennai involves different levels that help a person to develop his or her abilities considerably. Those who want to build their career in dot net can participate in the coaching classes which help them to seek jobs in leading companies. However, the fees for the training program might vary with a center and one should know more about them for accomplishing goals in life. Dot net training institute in Chennai offers both online and classroom services for students and others to focus more on their skill sets with excellence for ensuring optimal results.

Experienced trainers will assist the students to upgrade their skills with real time projects. In addition to that, they show methods for them to become an expert in IT industry. It is possible to seek jobs in software and other industries with a best dot net training institute in Chennai for starting a bright career. Fresh graduates who come out from their college and university can benefit a lot with the training programs for meeting essential needs. Moreover, they can know the course details from the faculties to select a right program which exactly suits a student. The dot net training aims at preparing a student to overcome challenges in a project to achieve desired outputs. It makes feasible ways for increasing the efficiency levels with industry experts and workshops.

As software technologies are growing rapidly these days, it is necessary for an employee or a student to implement them in a project. Several employers give preference to candidates who have a strong technical background. Having a dot net certificate will help a person to make his or her dreams true one in the job search process. Dot net course Chennai makes feasible ways for starting a new journey with flying colors. It is a perfect choice for excelling in programming areas for meeting essential requirements. Students must read the reviews and testimonials of training institutes before selecting a training program. This will help in getting more ideas about the coaching classes for augmenting the skills with industry experts and others. Most training centers conduct training programs with study materials to learn the lessons with the latest techniques.