Using System.Diagnostics;
Stopwatch st = new Stopwatch();st.Start();Repeater1.DataSource = SQLHelper.ExcuteDataSet().Table[0];Repeater1.DataBind();st.Stop();Label1.Text = st.ElapsedMilliseconds.ToString() + "ms"; //运行的总毫秒数.