Hello! I need some help in my Storage procedure code, when I want to save it and this error pops up. 

So when I run my program and click the register button it shows this error,Server Error in '/' Application.
Exception Details: System.Data.SqlClient.SqlException: Could not find stored procedure 'Insert_User'.
Source Error:
Server Error in '/' Application.
Could not find stored procedure 'Insert_User'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Data.SqlClient.SqlException: Could not find stored procedure 'Insert_User'.
Source Error:
|
(This is my stored procedure code)
ALTER PROCEDURE [dbo].[Insert_User]
@Firstname VARCHAR(50)
,@Middlename VARCHAR(50)
,@Lastname VARCHAR(50)
,@Suffix VARCHAR(50)
,@Nickname VARCHAR(50)
,@Username VARCHAR(50)
,@Password VARCHAR(50)
,@Gender VARCHAR(50)
,@Civilstatus VARCHAR(50)
,@Month VARCHAR(50)
,@Day VARCHAR(50)
,@Year VARCHAR(50)
,@Birthplace VARCHAR(50)
,@Citizenship VARCHAR(50)
,@Address VARCHAR(50)
,@Mobilenumber VARCHAR(50)
,@Emailaddress VARCHAR(50)
,@Fathername VARCHAR(50)
,@Fatherbplace VARCHAR(50)
,@Mothername VARCHAR(50)
,@Motherbplace VARCHAR(50)
,@Educattainment VARCHAR(50)
,@Occupation VARCHAR(50)
,@Religion VARCHAR(50)
,@Height VARCHAR(50)
,@Weight VARCHAR(50)
AS
BEGIN
SET NOCOUNT ON;
IF EXISTS(SELECT UserId FROM registration WHERE Username = @Username)
BEGIN
SELECT -1 -- Username exists.
END
ELSE IF EXISTS(SELECT UserId FROM registration WHERE Emailaddress = @Emailaddress)
BEGIN
SELECT -2 -- Email exists.
END
ELSE
BEGIN
INSERT INTO registration
([Firstname]
,[Middlename]
,[Lastname]
,[Suffix]
,[Nickname]
,[Username]
,[Password]
,[Gender]
,[Civilstatus]
,[Month]
,[Day]
,[Year]
,[Birthplace]
,[Citizenship]
,[Address]
,[Mobilenumber]
,[Emailaddress]
,[Fathername]
,[Fatherbplace]
,[Mothername]
,[Motherbplace]
,[Educattainment]
,[Occupation]
,[Religion]
,[Height]
,[Weight])
VALUES
(@Firstname
,@Middlename
,@Lastname
,@Suffix
,@Nickname
,@Username
,@Password
,@Gender
,@Civilstatus
,@Month
,@Day
,@Year
,@Birthplace
,@Citizenship
,@Address
,@Mobilenumber
,@Emailaddress
,@Fathername
,@Fatherbplace
,@Mothername
,@Motherbplace
,@Educattainment
,@Occupation
,@Religion
,@Height
,@Weight())
SELECT SCOPE_IDENTITY() -- UserId
END
END
Salman BegPosted Oct 16, 2016, 9:16 AM
Ly HuelarPosted Oct 15, 2016, 8:05 AM
Salman BegPosted Oct 15, 2016, 4:56 AM
Ranjit PowarPosted Oct 14, 2016, 1:02 PM