Saturday, 24 February 2018
Record Update ajax MVC
A programmer and Founder of Girfa
IT Services, working from 2009.At Starting computer teaching was my full-time job but after 10 years of teaching I chose to programming as a full-time job and teaching become part-time. In real life, I am very lazy and I made it my coding style I always try to make a reusable component that’s my USP for programming which saves my time and extra working both.
Friday, 23 February 2018
Save Data MVC Ajax
Target audience
Beginners learning MVC and want to save a from record into database using ajax.Table Structure
Store Procedure
USE[Girfa_DB]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTERProc[dbo].[AddRecord]
(
@rollbigint,
@namevarchar(20),
@cityvarchar(20)
)
AS
BEGIN
SETNOCOUNTON;
INSERTintoStudent(roll,Name,City)values(@roll,@name,@city)
SETNOCOUNTOFF;
END
Model
publicclassStudentModel
{
publicint Roll { get; set; }
publicstring Name { get; set; }
A programmer and Founder of Girfa
IT Services, working from 2009.At Starting computer teaching was my full-time job but after 10 years of teaching I chose to programming as a full-time job and teaching become part-time. In real life, I am very lazy and I made it my coding style I always try to make a reusable component that’s my USP for programming which saves my time and extra working both.
Wednesday, 21 February 2018
Data Render Using Razor
Display Student Record on cshtml page in table using Razor
@model IEnumerable<Britanic_MIS.Models.InvoiceModel>
<table >
<thead>
<tr><th>Roll</th><th>Name</th><th>City</th></tr>
</thead>
<tbody >
@foreach (var item in Model)
{
A programmer and Founder of Girfa
IT Services, working from 2009.At Starting computer teaching was my full-time job but after 10 years of teaching I chose to programming as a full-time job and teaching become part-time. In real life, I am very lazy and I made it my coding style I always try to make a reusable component that’s my USP for programming which saves my time and extra working both.
MVC Data Reader with Razor
Store Procedure
USE [Girfa_StudentDB]
GO
SET ANSI_NULLS
ON
GO
SET QUOTED_IDENTIFIER
ON
GO
alter proc [dbo].[GetStudentList]
AS
BEGIN
SET
NOCOUNT ON;
select
roll,name,city from dbo.Student
SET
NOCOUNT OFF;
END
Model
public class StudentModel
A programmer and Founder of Girfa
IT Services, working from 2009.At Starting computer teaching was my full-time job but after 10 years of teaching I chose to programming as a full-time job and teaching become part-time. In real life, I am very lazy and I made it my coding style I always try to make a reusable component that’s my USP for programming which saves my time and extra working both.
Subscribe to:
Posts (Atom)