Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        p = Session["per"] as Person;
        List <Tweet> t = m.getTweet(Session["selectid"].ToString());

        gdvtweets.DataSource = t;
        gdvtweets.DataBind();
    }
Exemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["per"] != null)
     {
         if (!IsPostBack)
         {
             per = Session["per"] as Person;
             string       user  = per.user_id;
             List <Tweet> tweet = m.getTweet(user).OrderByDescending(twt => twt.created).ToList();
             gdvtweet.DataSource = tweet;
             gdvtweet.DataBind();
         }
     }
     else
     {
         Response.Redirect("~/LogIn.aspx");
     }
 }