Only one time sorting happen
<p>There 4 column in my gridview. When I click any column, sorting happen only once for that column. Where is am I wrong?</p>

<p>Here is my code:</p>

<pre><code>protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
Bind();
} 

}

public void bind()
{
String connectionString = WebConfigurationManager.ConnectionStrings["ABConnectionString"].ConnectionString;
SqlConnection con = new SqlConnection(connectionString); 
con.Open();
DataSet ds = new DataSet();

SqlDataAdapter da = new SqlDataAdapter("select * from Table1",con);
try
{
da.Fill(ds, "Table1");

GridView1.DataSource = ds.Tables["Table1"];
Session["dttable"] = ds.Tables["Table1"];
GridView1.DataBind();
}
catch (Exception ex)
{

ex.ToString();

}


protected void GridView1_Sorting(object sender, GridViewSortEventArgs e)
{

string sortExpression = e.SortExpression;
string direction = string.Empty;
SortDirection GridViewSortDirection = e.SortDirection;
if (GridViewSortDirection == SortDirection.Ascending)
{

GridViewSortDirection = SortDirection.Descending;
direction = " DESC";

}

else
{
GridViewSortDirection = SortDirection.Ascending;

direction = " ASC";

}
DataTable dt = (DataTable)Session["dttable"];
dt.DefaultView.Sort = sortExpression + direction;
GridView1.DataSource = dt;
GridView1.DataBind();
}
public SortDirection SortDirection
{
get
{
if (ViewState["SortDirection"] == null)
{
ViewState["SortDirection"] = SortDirection.Ascending;
}
return (SortDirection)ViewState["SortDirection"];
}
set
{
ViewState["SortDirection"] = value;
}
}

}
</code></pre>
