CS文件
     string strid;
     strid=Request["id"];
     if(strid==null)
     { 
         strid="6,7,8,9"
     }
void BindData()
{
         sqlcom=new SqlCommand("AspNetPager",sqlcon);
sqlcom.CommandType=CommandType.StoredProcedure;
sqlcom.Parameters.Add("@pageindex",pager.CurrentPageIndex);
sqlcom.Parameters.Add("@pagesize",pager.PageSize);
sqlcom.Parameters.Add("@docount",false);
sqlcom.Parameters.Add("@ID",strid);
sqlcon.Open();
this.DataList1.DataSource=sqlcom.ExecuteReader();
this.DataList1.DataBind();
sqlcon.Close();} 
存储过程:
CREATE procedure AspNetPager
(@ID varchar(50),
@pagesize int,
@pageindex int,
@docount bit)
as
set nocount on
if(@docount=1)
select count(ID) from Article where classid in(@ID) and pass=1
else
begin
declare @indextable table(id int identity(1,1),nid int)
declare @PageLowerBound int
declare @PageUpperBound int
set @PageLowerBound=(@pageindex-1)*@pagesize
set @PageUpperBound=@PageLowerBound+@pagesize
set rowcount @PageUpperBound
insert into @indextable(nid) select ID from Article where classid in(@ID) and pass=1 order by UpDateTime desc
select * from Article O inner join Articleclass b on O.classid=b.id,@indextable t where O.ID=t.nid
and t.id>@PageLowerBound and t.id<=@PageUpperBound order by t.id
end
set nocount off
GO 
 问:怎么实现  条件 where classid in(@ID)  也就是 where classid in(6,7,8,9)
谢谢大家