I have a query and i am trying to bind class inside a dropdown but it showing the following error...
"Procedure or function 'BindSectionByTeacher' expects parameter '@SchoolId', which was not supplied."
I Understand the error but i think i have supplied the SchoolId ....Below is my query....
ALTER PROCEDURE [dbo].[BindClassByTeacher]
@TeacherId int,
@SchoolId int
AS
BEGIN
select T.AllowtedClass,T.ClassId from TeacherAllowtedClass T
inner join SchoolMaster S
on S.School_ID=T.School_ID
where T.School_ID=@SchoolId and T.Teacher_ID=@TeacherId
Order by T.ClassId
END
and my backend coding is...
DbConnection bind = new DbConnection();
bind.BindDropdownlist_para(ddlclass, "[BindClassByTeacher]", "AllowtedClass", "ClassId", "@SchoolId", Session["School"].ToString(),
"@TeacherId", Session["teacherid"].ToString());
Allowted Class ClassId
11th 2
Nursery 4
10th 8
Please try to help me...thanx....