首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

asp.net中搜索绑定有关问题请大家快快帮忙给个思路呀!

2012-01-03 
asp.net中搜索绑定问题请大家快快帮忙给个思路呀!!!sql selectidasid,gjznameastitle,webcontentasconte

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!

热点排行