在dotnet设计论坛中,如何在gridwise中按类别显示 [英] in dotnet designing a forum how to display that in a gridview in category wise

查看:63
本文介绍了在dotnet设计论坛中,如何在gridwise中按类别显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在设计一个论坛,我将其显示在一个类别中,并在其问题下创建2个表,一个用于类别categoryname,id,另一个则是questoin,categoryid,qsid.我没有找到解决方案,请任何人都可以告诉我.

我想在网格视图中显示它
喜欢

软件论坛
Q1
Q2
Q3
硬件论坛
Q1
Q2
游戏论坛
Q1
Q2

谢谢u


i am designing a forum ,i display that in a category and under its questions,i create 2 tables one for category categoryname,id and another one is questions questoin,categoryid,qsid.i didn''t find solution to do this, pls any one can tell me.

i want to display that in a grid view
like

Software forum
Q1
Q2
Q3
Hardware forum
Q1
Q2
Games forum
Q1
Q2

Thank u

推荐答案

尝试一下.

try this.

<asp:Repeater ID="rep1" runat="server">
           <HeaderTemplate>
           </HeaderTemplate>
           <ItemTemplate>
               <table width="100%" border="1">
                   <tr valign="top">
                       <td valign="top" width="5%">
                           [Category]//Bind data from database
                       </td>
                     </tr>
                      <tr>
                       <td valign="top" width="95%">
                           <asp:Repeater ID="innerRep" runat="server" OnItemDataBound="Inner_rep_ItemDataBound">
                               <ItemTemplate>
                                   <table width="100%">
                                       <tr>
                                           <td width="9%">
                                              [ Questions] //Bind data from database
                                           </td>
                                       </tr>
                               </ItemTemplate>
                               <FooterTemplate>
                                   </table>
                               </FooterTemplate>
                           </asp:Repeater>
                       </td>
                   </tr>
           </ItemTemplate>
           <FooterTemplate>
               </table>
           </FooterTemplate>
       </asp:Repeater>




代码自己尝试编码的背后,我刚刚给了你一个主意.




Code Behind coding try out by yourself i have just given u an idea.


这篇关于在dotnet设计论坛中,如何在gridwise中按类别显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆