protected void Page_Load(object sender, EventArgs e)
        {
            d = new database();

            RepChild.DataSource = d.GetAllChildren();
                RepChild.DataBind();
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     d = new database();
     if (d.CurrentUser != null)
     {
         RepChild.DataSource = d.GetAllChildByAccountID(d.CurrentUser.AccountID);
         RepChild.DataBind();
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            long childid = Convert.ToInt64(Request.QueryString["cid"]);

            d = new database();
            child = d.GetChildByID(childid);

            if (child != null && child.ChildPic1ID !=null)
            {
                Response.Clear();
               Response.ContentType = "png";
                Response.BinaryWrite(child.ChildPic1ID.ToArray());
            }
            else
            {
                Response.Redirect("~/Images/nav_bg.png");
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            d = new database();
            if (d.CurrentUser != null)
            {
                acnt = d.GetAccountByAccountID(d.CurrentUser.AccountID);

            }
            else
            {
                Response.Redirect("http://localhost:11834/Default.aspx");
            }
            if (acnt != null)
            {
                long uid = Convert.ToInt64(Request.QueryString["uid"]);
                if (uid != null)
                {
                    Child child = d.GetChildByID(uid);
                    if (child != null)
                    {
                        TBAddress.Text = child.ChildAddress;
                        TBAge.Text = child.ChildAge.ToString();
                        TBCareNumber.Text = child.CareNumber.ToString();
                        TBCity.Text = child.ChildCity;
                        TBCountry.Text = child.ChildCountry;
                        TBName.Text = child.ChildName;
                        TBStory.Text = child.ChildStory;

                    }
                    else
                    {
                        TBCareNumber.Text = acnt.MobileNo.ToString();
                    }
                }

            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     d = new database();
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            d = new database();
            uid = Convert.ToInt64(Request.QueryString["uid"]);
            if (!string.IsNullOrEmpty(Request.QueryString["uid"]))
             {
                 Child child = d.GetChildByID(uid);
                 if (child != null)
                 {

                     Page.Title = child.ChildName;

                     HtmlMeta meta = new HtmlMeta();
                     meta.Name = "Description";
                     meta.Content = child.ChildName + " " + child.ChildCountry + " " + child.ChildStory;
                     MetaPlaceHolder.Controls.Add(meta);

                     HtmlMeta metaImage1 = new HtmlMeta();
                     metaImage1.Attributes.Add("property", "og:image:type");
                     metaImage1.Content = "image/png";
                     MetaPlaceHolder2.Controls.Add(metaImage1);

                     HtmlMeta metaImage3 = new HtmlMeta();
                     metaImage3.Attributes.Add("property", "og:image:height");
                     metaImage3.Content = "148";
                     MetaPlaceHolder3.Controls.Add(metaImage3);

                     HtmlMeta metaImage4 = new HtmlMeta();
                     metaImage4.Attributes.Add("property", "og:image:width");
                     metaImage4.Content = "148";
                     MetaPlaceHolder4.Controls.Add(metaImage4);

                     HtmlMeta metaImage5 = new HtmlMeta();
                     metaImage5.Attributes.Add("property", "og:url");
                     metaImage5.Content = HttpContext.Current.Request.Url.AbsoluteUri;
                     MetaPlaceHolder5.Controls.Add(metaImage5);
                     HtmlMeta metatitle = new HtmlMeta();
                     metaImage5.Attributes.Add("property", "og:title");
                     metaImage5.Content = child.ChildName + ", Age:" + child.ChildAge + ", City:" + child.ChildCity + ", Country:" + child.ChildCountry ;
                     Metatitle.Controls.Add(metaImage5);

                     meta.Content = child.ChildName + " " + child.ChildCountry + " " + child.ChildStory;
                     string saveToFolder = "http://localhost:11834/Photos//" + child.FileName;
                     HtmlMeta metaImage2 = new HtmlMeta();
                     metaImage2.Attributes.Add("property", "og:image");
                     metaImage2.Content = saveToFolder;
                     MetaPlaceHolder2.Controls.Add(metaImage2);
                     LBFacebook.Text = "<a name=\"fb_share\"  share_url='http://www.sharedream.in/Help.aspx?uid=" + uid +"' ></a>";
                     LBTwitter.Text = " <a href=\"https://twitter.com/share\" class=\"twitter-share-button\" data-url=\"http://www.sharedream.in/Help.aspx?uid=" + uid + "\" data-via=\"ceo_zerobuddy\">Tweet</a>";
                     LID.Text = "";
                     LChildName.Text = child.ChildName.ToString();
                     LChildAge.Text = child.ChildAge.ToString();
                     Label1.Text = child.ChildStory;
                     IChildPic1.ImageUrl = "~/profilePic.aspx?cid=" + uid;
                     RepHelp.DataSource = d.GetAllhelpByChildID(uid);
                     RepHelp.DataBind();
                     if (RepHelp.Items.Count > 0)
                     {
                         LKind.Text = "<h1>Kind of Help (" + RepHelp.Items.Count + ")</h1>";
                     }
                 }
             }
        }