<!-- Client -->
<div>
<ul>
<li style="cursor:pointer" onclick="javascript: __doPostBack('','SortSNDesc'); " >User SN Desc</li>
<li style="cursor:pointer" onclick="javascript: __doPostBack('','SortName');"> User Name</li>
</ul>
</div>
' Server Code Behind
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If IsPostBack Then
Select Case Request("__EVENTARGUMENT")
Case "SortSNDesc"
ListView1.Sort("UserSN", SortDirection.Descending)
Case "SortName"
ListView1.Sort("FullName", SortDirection.Ascending)
End Select
End If
End Sub
沒有留言:
張貼留言