Пример #1
0
 private void GetNews()
 {
     try
     {
         using (DataClassesDataContext data = new DataClassesDataContext())
         {
             var listNews = data.GetTopNews_En().ToList();
             rptNews.DataSource = listNews;
             rptNews.DataBind();
         }
     }
     catch (Exception ex)
     {
         // error message here
     }
 }