TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
prathyusha
NA
180
74.5k
how to count the rating value using rating control
Jan 2 2013 11:59 PM
hi
protected void BindRatingControl()
{
int total = 0;
DataTable dt = new DataTable();
con.Open();
//SqlCommand cmd = new SqlCommand("Select Rate from tbl_ratei", con);
//SqlDataAdapter da = new SqlDataAdapter(cmd);
//da.Fill(dt);
cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "sp_getratingcount1";
cmd.Parameters.AddWithValue("@sno", "0");
cmd.Parameters.AddWithValue("@Name", "0");
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(dt);
if (dt.Rows.Count > 0)
{
for (int i = 0; i < dt.Rows.Count; i++)
{
total += Convert.ToInt32(dt.Rows[i][0].ToString());
}
int average = total / (dt.Rows.Count);
Rating1.CurrentRating = average;
Label4.Text = dt.Rows.Count.ToString();
}
}
by using above method it counts the rate value for all but i want to count individual in gridview like justdial when search for hotels in justdial it display all and i want rate particular that hotel rating will be increase how? please help me
Reply
Answers (
0
)
Logout all other sessions in case of multiple login By same
how to bind the label to gridview