helo to all i am making an asp.net web application...I have given the system of rating the product..
for that i have taken four radio buttons behnid that product, Ist radio of 25%, second of 50% and
so on...
user rate that product and i saved it in database
1.)product id
2.)userid
3.)rating.
Now suppose when user rates the product and after that log out..now when any user login into the
software then the product which got more ratings in database should come at front page and written
as "product of the day" and the details of that product..
suppose i have two entries of t.v in database
t.v-25%
t.v-50%
and watch
watch-75%
watch-100%
now overall, watch got more rating as showing in database--
on buttonvote i have done this
protected void btnvote_Click(object sender, EventArgs e)
{
int s=0;
if (rd1.Checked)
{
s = 25;
}
else if (rd2.Checked)
{
s = 50;
}
else if (rd3.Checked)
{
s = 75;
}
else if (rd4.Checked)
{
s = 100;
}
DataSet ds = new DataSet();
OleDbDataAdapter adp = new OleDbDataAdapter("select * from ratings", con);
adp.Fill(ds,"virtual");
DataRow dr4;
dr4 = ds.Tables["virtual"].NewRow();
dr4[0] = lblname.Text;
dr4[1] = s;
dr4[2] = mm.Text;
ds.Tables["virtual"].Rows.Add();
adp.InsertCommand = new OleDbCommand();
adp.InsertCommand.CommandText = "insert into ratings values(" + "'" + lblname.Text + "'" +
"," + "'" + s + "'" + "," + "'" + mm.Text + "'" + ")";
adp.InsertCommand.Connection = con;
adp.Update(ds, "virtual");
Response.Write("<script>alert('Thanks for your rating')</script>");
rd1.Visible = false;
rd2.Visible = false;
rd3.Visible = false;
rd4.Visible = false;
Image1.Visible = false;
Image2.Visible = false;
HyperLink1.Visible = false;
btnvote.Visible = false;
Label4.Visible = false;
Label3.Visible = false;
}
after that what will i have to do plz help me.