asp.net中搜索绑定问题请大家快快帮忙给个思路呀!!!
sql= "select id as id,gjzname as title,webcontent as content,weburl as http,addtime as addtime,price as onclick,1 as type,yhid as hyid form s_gjz where gjzname= ' "+searchkey+ " ' ";
sql=sql+ "UNION ALL ";
sql=sql+ "select id as id,title as title,content as content,http as http,addtime as addtime,onclick as onclick,0 as type,0 as hyid from jxsbss where ifzdlr= '2 ' and title LIKE '% "+searchkey+ "% ' ";
sql=sql+ " order by type desc,onclick desc,addtime desc ";
adapter=new SqlDataAdapter (sql,con);
adapter.Fill(ds,startindex,psize, "jxsbss ");
<asp:Repeater ID= "showkeyinfo " runat= "server ">
<itemtemplate>
</itemtemplate>
</asp:repeater>
作用,同时显示两个表里的内然后绑定到Repeater 的控件显示数据
这样显示是否正确,如果不正确请大家给于指示
------解决方案--------------------
Click the link to solve your problem.Good luck!