gridview的模板列排序

        <asp:TemplateField SortExpression="title"  >
            <HeaderTemplate  >
                <asp:LinkButton ID="LinkButton0"  runat="server" Text="帖子主题" CommandName="Sort" CommandArgument="title"></asp:LinkButton>
            </HeaderTemplate>
            <ItemTemplate >
                <asp:LinkButton ID="LinkButton1" runat="server" PostBackUrl='<%# Eval("messageId","~/UI/MessageInfo.aspx?messageId={0}") %>'
                    Text='<%# Eval("title", "{0}") %>'></asp:LinkButton>
            </ItemTemplate>
        </asp:TemplateField>

顺便请教  用什么工具能把代码贴成vs2005中那样式?

你可能感兴趣的:(GridView)