Eswar Datta

Eswar Datta

  • NA
  • 115
  • 7.5k

Web Service and jquery ajax

Sep 28 2018 4:22 AM
I wrote a stored procedure in sql-server for inserting data
CREATE PROCEDURE [dbo].[ASP_INSERT_CATEGORY](@CATEGORY_NAME NVARCHAR(MAX),@CATEGORY_DESCRIPTION NVARCHAR(MAX))
AS BEGIN
DECLARE @COUNT INT
SELECT @COUNT = COUNT(CATEGORY_NAME) FROM PARES_MASTER_CATEGORIES WHERE CATEGORY_NAME=@CATEGORY_NAME
IF(@COUNT>1)
BEGIN
SELECT 1 AS ALREADY_SAVED
END
ELSE
BEGIN
INSERT INTO [PARES_MASTER_CATEGORIES] (CATEGORY_NAME,CATEGORY_DESCRIPTION,STATUS) VALUES(@CATEGORY_NAME,@CATEGORY_DESCRIPTION,1)
END
END
Now i want to create a webservice and call that webmethod with jquery-ajax
 
But i don,t know how will do it.
 
Any body could u plz send me solution 

Answers (4)