Advertisement
Guest User

Untitled

a guest
Jul 25th, 2010
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.11 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.UI;
  6. using System.Web.UI.WebControls;
  7.  
  8. namespace WebApplication1
  9. {
  10.     public partial class Test : System.Web.UI.Page
  11.     {
  12.         protected void Page_Load(object sender, EventArgs e)
  13.         {
  14.             if (!Page.IsPostBack)
  15.             {
  16.                 BindGrid();
  17.             }
  18.         }
  19.  
  20.         private void BindGrid()
  21.         {
  22.             List<UserStatusCalendar> show = new List<UserStatusCalendar>();
  23.  
  24.             show.Add(new UserStatusCalendar { UserName = "foo", Email = "foo@bar.com", Status = "Good", Date = "Jan 1 2010 10:09" });
  25.             show.Add(new UserStatusCalendar { UserName = "bar", Email = "z@abc.com", Status = "No Good", Date = "Aug 9 2010 11:19" });
  26.  
  27.             statusCal.DataSource = show;
  28.             statusCal.DataBind();
  29.         }
  30.     }
  31.  
  32.     public class UserStatusCalendar
  33.     {
  34.         public string UserName { get; set; }
  35.         public string Email { get; set; }
  36.         public string Status { get; set; }
  37.         public string Date { get; set; }
  38.     }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement