+91-90427 10472
         
Dot net training in Chennai

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.