function getCheckTime(p) {
            $('#main').empty();
            $.ajax({
                type: 'POST',
                data: { monthdate: p.monthdate, studentid: p.studentid, deptname: p.deptname},
                dataType: 'json',
                url: '../DATA/student/Info.ashx',
                success: function(data) {
                    if (!data.success) {
                        $('#main').append('<tr><td colspan="10">' + data.msg + '</td></tr>');
                    } else {
                        var json = data.data;
                        $.each(json, function(i) {
                            $('#INFO').append('<tr><td>' + json[i].studentno+ '</td><td>' + json[i].namee+ '</td><td>' + json[i].WorkDate + '</td>'
                                + '<td>' + json[i].date1 + '</td><td>' + json[i].date2+ '</td><td>' + json[i].date3+ '</td><td>' + json[i].date4+ '</td>'
                                + '<td>' + json[i].date5+ '</td><td>' + json[i].date6+ '</td></tr>').find('tr:even').addClass('even');
                        })
                    }
                }
            });
        }
有一页面  根据上课日期(WorkDate),班级(deptname),学生编号(studentid)查询学生上课时间
页面为左右结构,当选择某一学生时,在右边显示该学生的上课信息 (学生编号,名字,上课日期,第一节,第二节,...第六节 的信息) 刚进入页面未选择某个学生,选择时间跟班级后在右边出现该班级所有学生的上课信息
  
问:../DATA/student/Info.ashx 要怎么写才能把该学生上课信息读取出来 ,我上面的写法哪些出现了错误,为什么老是提示 过程或函数 'student' 需要参数 '@studentid',但未提供该参数。我要怎么修该??

解决方案 »

  1.   

    过程或函数 'student' 需要参数 '@studentid'
    是因为你后台没有给@studentid参数赋值  。
    data 传递过去的变量后台获得到了没有 ?monthdate studentid 这些 。
      

  2.   

    后台调用了存储过程吧,存储过程中需要穿参数@studentid,检查下前台的有没有把对应的值传递过去。
      

  3.   

    怎么样才能给后台@studentid参数monthdate参数 赋值啊?
      

  4.   

          context.Response.ContentType = "text/plain";
            string studentid = context.Server.UrlDecode(context.Request.Form["studentid"]);
            string data = context.Server.UrlDecode(context.Request.Form["data"]);
     string deptname = context.Session["deptname"].ToString();
                        context.Response.Write(new studentworkdate().getwork(studentid, deptname, data));可不可以这么给后台参数赋值