System.Web.UI.WebControls.Repeater.DataBind C# (CSharp) Method

DataBind() public method

public DataBind ( ) : void
return void
		public override void DataBind ()
		{
			// In all the examples I've seen online, this does base.OnDataBinding and
			// then does all the create child controls stuff. But from stack traces on
			// windows, this doesn't seem to be the case here.
			OnDataBinding (EventArgs.Empty);

#if NET_2_0
			RequiresDataBinding = false;
#endif
		}
		

Usage Example

Example #1
0
        public void Loadlist(Repeater rpt)
        {
            try
            {
                int sotin = (_typecat == 0 ? lnews.Getsotin(_Catid) : 100);
                var list = lnews.Load_listnews(_Catid);
                if (list.Count > 0)
                {
                    if (_page != 0)
                    {
                        rpt.DataSource = list.Skip(sotin * _page - sotin).Take(sotin);
                        rpt.DataBind();
                    }
                    else
                    {
                        rpt.DataSource = list.Take(sotin);
                        rpt.DataBind();
                    }
                    ltrPage.Text = change.result(list.Count, sotin, _cat_seo_url, 0, _page, 1);
                }
                else { }

            }
            catch (Exception)
            {

                throw;
            }
        }
All Usage Examples Of System.Web.UI.WebControls.Repeater::DataBind