数据绑定转发器时会发生此错误:
sql Server不处理NText,Text,Xml或 Image数据类型的比较
sql Server不处理NText,Text,Xml或 Image数据类型的比较
protected void Page_Load(object sender,EventArgs e) { topicid = Convert.ToInt32(Request.QueryString["topic".ToString()]); if (!IsPostBack) { MusicForumDataContext db = new MusicForumDataContext(); var query = from p in db.posts where p.categoryid == NAME select p; rptposts.DataSource = query; rptposts.DataBind(); <---- ERROR } }