|
Dieser Artikel wurde maschinell übersetzt. Bewegen Sie den Mauszeiger über die Sätze im Artikel, um den Originaltext anzuzeigen. Weitere Informationen
|
Übersetzung
Original
|
SortDirection-Enumeration
Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
<%@ Page language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server"> void AuthorsGridView_Sorted(Object sender, EventArgs e) { // Display the sort direction. if(AuthorsGridView.SortDirection == SortDirection.Ascending) { Message.Text = "Sorting in ascending order."; } else { Message.Text = "Sorting in descending order."; } } </script> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>SortDirection Example</title> </head> <body> <form id="form1" runat="server"> <h3>SortDirection Example</h3> <asp:label id="Message" forecolor="Red" runat="server"/> <br/><br/> <asp:gridview id="AuthorsGridView" datasourceid="AuthorsSqlDataSource" allowsorting="true" onsorted="AuthorsGridView_Sorted" runat="server"/> <!-- This example uses Microsoft SQL Server and connects --> <!-- to the Pubs sample database. --> <asp:sqldatasource id="AuthorsSqlDataSource" selectcommand="SELECT [au_id], [au_lname], [au_fname], [address], [city], [state], [zip], [contract] FROM [authors]" updatecommand="UPDATE authors SET au_lname=@au_lname, au_fname=@au_fname, address=@address, city=@city, state=@state, zip=@zip, contract=@contract WHERE (authors.au_id = @au_id)" connectionstring="server=localhost;database=pubs;integrated security=SSPI" runat="server"> </asp:sqldatasource> </form> </body> </html>
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core-Rolle wird nicht unterstützt), Windows Server 2008 R2 (Server Core-Rolle wird mit SP1 oder höher unterstützt; Itanium wird nicht unterstützt)
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen für .NET Framework.