怎麼辦,每次s_Sort不更新SortDirection.Desc如何做那些領域不是啓動?
private SortDirection s_Sort = SortDirection.Desc;
protected void Page_Load(object sender, EventArgs e)
{
lblSort.Text = S_Sort.ToString();//every time == SortDirection.Desc - this is bad!
if (!IsPostBack)
{
ShowTree();
Validate();
}
}
需要
public void btnSortUp_Click(object sender, EventArgs e)
{
S_Sort = SortDirection.Asc;
}
public void btnSortDown_Click(object sender, EventArgs e)
{
S_Sort = SortDirection.Desc;
}
但經過SortDirection.Desc不好
如果不wan't它是SortDirection.Desc然後不要每次都分配它......它需要做什麼呢? – CRice 2011-03-31 23:12:09
@CRice,我編輯帖子 – Mediator 2011-04-01 07:16:47