Consume WebService using AJAX JSON and populate GridView in ASP.Net

Last Reply one year ago By pandeyism

Posted one year ago

Sir,

 I have create a Web Project (NOTE: a web project, not a website) 

Need to create a web service using visual studio 2012 and to consume it via AJAX JSON method to bind gridview. Got lots of article on google but didn't worked at all. 

Therefore kindly suggest any demo or sample regarding this.

Below is the schema with data of my database that need to be bind to gridview via web service:

USE [EmployeeDb]
GO
/****** Object:  Table [dbo].[EmployeeMaster]    Script Date: 6/20/2018 10:36:42 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[EmployeeMaster](
	[Empid] [int] IDENTITY(1,1) NOT NULL,
	[EmployeeName] [varchar](20) NULL,
	[EmployeeContact] [varchar](10) NULL,
	[EmployeeGender] [char](6) NULL,
 CONSTRAINT [PK_EmployeeMaster] PRIMARY KEY CLUSTERED 
(
	[Empid] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
SET IDENTITY_INSERT [dbo].[EmployeeMaster] ON 

GO
INSERT [dbo].[EmployeeMaster] ([Empid], [EmployeeName], [EmployeeContact], [EmployeeGender]) VALUES (1, N'Sumeet Kumar', N'7006658681', N'Male  ')
GO
INSERT [dbo].[EmployeeMaster] ([Empid], [EmployeeName], [EmployeeContact], [EmployeeGender]) VALUES (2, N'Master Sunny', N'9858687435', N'Male  ')
GO
INSERT [dbo].[EmployeeMaster] ([Empid], [EmployeeName], [EmployeeContact], [EmployeeGender]) VALUES (3, N'K J Raman', N'7005659856', N'Male  ')
GO
INSERT [dbo].[EmployeeMaster] ([Empid], [EmployeeName], [EmployeeContact], [EmployeeGender]) VALUES (4, N'Keerat Singh', N'7800125478', N'Male  ')
GO
INSERT [dbo].[EmployeeMaster] ([Empid], [EmployeeName], [EmployeeContact], [EmployeeGender]) VALUES (5, N'Sukhi', N'9745850021', N'Male  ')
GO
SET IDENTITY_INSERT [dbo].[EmployeeMaster] OFF
GO

 

You are viewing reply posted by: pandeyism one year ago.