SPWeb web = SPContext.Current.Web;
SPList list = web.Lists["Student Profile"];
string caml = string.Format(@"
SPQuery query = new SPQuery(list.DefaultView);
query.Query = caml;
SPListItemCollection items = list.GetItems(query);
st_attendence.DataSource = items.GetDataTable();
st_attendence.DataBind();
Controls.Add(st_attendence);
In above code i used two condions (Academic Year and Class). At this time getting this Error
If i write one condition it works fine. But it does't work for 2 or 3 conditions
-------------------
ans :
I have also spent lot time in this found that the spquery tag are case sensitive and i was using
Just make sure you are writing the exact query syntax..
No comments:
Post a Comment