hi all,i'm still new to asp.net and i'm having some difficulties.
i have an asp page where it will display the result of a select count(*) result if the user clicks on a button control. i have bind the sqldatasource to the gridview.
the problem is i need to get a percentage value out of the select count(*) statement. the current output is it displays the total number and not in percentage value.
so how do i go about doing this. i got suggestions from others saying that i need to assign a variable to the result of select count(*) in order to get the percentage.
much thanks people. :)
protected void button4submit_Click(object sender, EventArgs e)
{
SqlDataSource ds = SqlDataSource1;
string SQLString1 = "SELECT DISTINCT COUNT(*) FROM [INGATE] WHERE VEHNO=' ' AND LICENSENO <> ' '";
ds.SelectCommand = SQLString1;
GridView1.DataSource = ds;
GridView1.DataBind();
GridView1.Visible = true;
}