private void cb_Callback(object sender, CallBackEventArgs e)
        {
            Data.Topics db = new Data.Topics();
            if (e.Parameters.Length > 0)
            {
                int rate = Convert.ToInt32(e.Parameter);
                if (rate >= 1 && rate <= 5)
                {
                    RatingValue = db.Topics_AddRating(TopicId, UserId, rate, string.Empty, HttpContext.Current.Request.UserHostAddress.ToString());
                }
            }

            CallBackContent cbContent = new CallBackContent();

            cbContent.Controls.Add(new LiteralControl(RenderRating()));
            cb.Content = cbContent;
            cb.Content.RenderControl(e.Output);
        }
Exemple #2
0
		private void cb_Callback(object sender, CallBackEventArgs e)
		{
			Data.Topics db = new Data.Topics();
			if (e.Parameters.Length > 0)
			{
				int rate = Convert.ToInt32(e.Parameter);
				if (rate >= 1 && rate <= 5)
				{
					RatingValue = db.Topics_AddRating(TopicId, UserId, rate, string.Empty, HttpContext.Current.Request.UserHostAddress.ToString());
				}
			}

			CallBackContent cbContent = new CallBackContent();
			cbContent.Controls.Add(new LiteralControl(RenderRating()));
			cb.Content = cbContent;
			cb.Content.RenderControl(e.Output);
		}