Exemple #1
0
        protected void AllUsersRepeater_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            objDBhelper = new FaceBookHelper.DataBaseRequest();

            int    rowIndex = e.Item.ItemIndex;
            String cmd      = e.CommandName;

            HttpCookie myCookie    = Request.Cookies["CIS3342_Cookie"];
            String     userID      = myCookie.Values["userID"];
            String     myFirstName = myCookie.Values["firstName"];
            String     myLastName  = myCookie.Values["lastName"];


            // Retrieve a value from a control in the Repeater's Items collection
            LinkButton tempFriendID = (LinkButton)YourFrindListRepeater.Items[rowIndex].FindControl("LinkButtonUserID");
            String     friendID     = tempFriendID.Text;

            Label  firstNameLabel = (Label)YourFrindListRepeater.Items[rowIndex].FindControl("lblFirstName");
            String firstName      = firstNameLabel.Text;

            Label  lastNameLabel = (Label)YourFrindListRepeater.Items[rowIndex].FindControl("lblLastName");
            String lastName      = lastNameLabel.Text;



            TextBox wallMessage = (TextBox)YourFrindListRepeater.Items[rowIndex].FindControl("txtFriendsWall");

            String time    = DateTime.Now.ToLongTimeString();
            String date    = DateTime.Now.ToLongDateString();
            String message = wallMessage.Text;

            String writeOnWall = myFirstName + " " + myLastName + "  Date: " + date + " Time: " + time + "  ";

            writeOnWall += message + "~";

            if (cmd == "CmdbtnWriteOnFriendsWall")
            {
                cmd = "Button 'btnWriteOnWall' was Clicked";

                lblNewsFeedInfo.Text = cmd + " <br/> <br/>" + "row: " + rowIndex + " <br/> friend's ID: " + friendID + "<br/> <br/>" + "Author Of Post: " + writeOnWall;

                //code here to write on frind's wall, first get the user's record then append this post onto the orginal and then update the WallPost record
                DataSet friendRecord         = objDBhelper.GetUserRecordByID(int.Parse(friendID));//gets target friend's record
                String  friendRecordWallPost = "";
                for (int i = 0; i < friendRecord.Tables[0].Rows.Count; i++)
                {
                    friendRecordWallPost = friendRecord.Tables[0].Rows[i]["WallPost"].ToString();
                }
                friendRecordWallPost += writeOnWall;
                objDBhelper.UpdateWallPost(friendID, friendRecordWallPost);

                //code here to write on frind's wall, first get the user's record then append this post onto the orginal and then update the WallPost record
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                objDBhelper = new FaceBookHelper.DataBaseRequest();

                Session["SecurityQuestions1"] = objDBhelper.SecurityQuestions1;
                Session["SecurityQuestions2"] = objDBhelper.SecurityQuestions2;
                Session["SecurityQuestions3"] = objDBhelper.SecurityQuestions3;

                BindDropDownLists();
            }
        }
Exemple #3
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            objDBhelper = new FaceBookHelper.DataBaseRequest();
            SerializeAndDeserializing = new FaceBookHelper.SerializeAndDeserializing();

            String backgroundColors = "";
            String fontColors       = "";
            String fontTypes        = "";
            String theme            = "";

            ////backgroundColors
            int strDdlValue = Convert.ToInt32(ddlBackgroundColors.SelectedValue);

            switch (strDdlValue)
            {
            case 1:
                backgroundColors = "background-color:#000";
                break;

            case 2:
                backgroundColors = "background-color:#ff0000";
                break;

            case 3:
                backgroundColors = "background-color:#00ff00";
                break;

            case 4:
                backgroundColors = "background-color:#0000ff";
                break;

            case 5:
                backgroundColors = "background-color:#ffff00";
                break;

            case 6:
                backgroundColors = "background-color:#00ffff";
                break;

            case 7:
                backgroundColors = "background-color:#ffb6c1";
                break;

            case 8:
                backgroundColors = "background-color:#fff";
                break;

            case 9:
                backgroundColors = "background-color:#dfe3ee";
                break;

            default:
                break;
            }

            int strDdlValuefontColors = Convert.ToInt32(ddlFontColors.SelectedValue);

            switch (strDdlValuefontColors)
            {
            case 1:
                fontColors = "color:#000";
                break;

            case 2:
                fontColors = "color:#ff0000";
                break;

            case 3:
                fontColors = "color:#00ff00";
                break;

            case 4:
                fontColors = "color:#0000ff";
                break;

            case 5:
                fontColors = "color:#ffff00";
                break;

            case 6:
                fontColors = "color:#00ffff";
                break;

            case 7:
                fontColors = "color:#ffb6c1";
                break;

            case 8:
                fontColors = "color:#fff";
                break;

            default:
                break;
            }

            int strDdlValuefontTypes = Convert.ToInt32(ddlFontTypes.SelectedValue);

            switch (strDdlValuefontTypes)
            {
            case 1:
                fontTypes = "font-family:Serif";
                break;

            case 2:
                fontTypes = "font-family:Sans-Serif";
                break;

            case 3:
                fontTypes = "font-family:Monospace";
                break;

            case 4:
                fontTypes = "font-family:Fantasy";
                break;

            case 5:
                fontTypes = "font-family:Script";
                break;

            default:
                break;
            }

            int    test             = Convert.ToInt32(radLoginPreferences.SelectedValue);
            String loginPreferences = "";

            switch (test)
            {
            case 1:
                loginPreferences = "None";
                break;

            case 2:
                loginPreferences = "Fast";
                break;

            case 3:
                loginPreferences = "Auto";
                break;

            default:
                break;
            }

            HttpCookie myCookieTheme = new HttpCookie("CIS3342_CookieCustom");

            myCookieTheme.Values["backgroundColors"] = backgroundColors;
            myCookieTheme.Values["fontColors"]       = fontColors;
            myCookieTheme.Values["fontTypes"]        = fontTypes;
            myCookieTheme.Values["themes"]           = theme;
            myCookieTheme.Expires = new DateTime(2025, 1, 1);

            Response.Cookies.Add(myCookieTheme);

            HttpCookie cookie       = Request.Cookies["CIS3342_Cookie"];
            String     tempUsername = cookie.Values["userName"].ToString();
            String     tempPassword = cookie.Values["passWord"].ToString();

            objDBhelper.ChangeUserloginPreference(tempUsername, tempPassword, loginPreferences); //updates user's "Login Preferences" record in database table

            cookie.Values["loginPreferences"] = loginPreferences;                                //updates cookie "loginPreferences" value
            Response.Cookies.Add(cookie);


            lblSaveINFO.Visible = true;
            lblSaveINFO.Text    = "*User's Settings Saved*";

            //code here to serialize the user's loginPreferences and background color
            HttpCookie cookieUser = Request.Cookies["CIS3342_Cookie"];

            int    userIDCookie           = int.Parse(cookieUser.Values["userID"]);
            String loginPreferencesCookie = cookieUser.Values["loginPreferences"];

            SerializeAndDeserializing.SerializingUserSettingsOBJ(userIDCookie, loginPreferencesCookie, backgroundColors);
            //code here to serialize the user's loginPreferences and background color


            //HttpCookie myCookie = Request.Cookies["CIS3342_Cookie"];
            //String myEmail = myCookie.Values["Email"];
            ////code here to send an email confirmation after the friend request is sent out //
            //Email objEmail = new Email();
            //String strTO = myEmail;//insert the recipient's email address here
            //String strFROM = "Face Book Maintenance Team";
            //String strSubject = "Update Account";
            //String strMessage = "Thank For Updating Your Account!";
            //objEmail.SendMail(strTO, strFROM, strSubject, strMessage);
            ////code here to send an email confirmation after the friend request is sent//



            //string loginSettings, privacySettings, fontTypeSettings, fontColorSettings,
            //    backgroundColorSettings, themeSettings;

            //loginSettings = radLoginPreferences.Text;
            //privacySettings = radPrivacySettings.SelectedItem.Text;
            //fontTypeSettings = ddlFontTypes.SelectedItem.Text;
            //fontColorSettings = ddlFontColors.SelectedItem.Text;
            //backgroundColorSettings = ddlBackgroundColors.SelectedItem.Text;
            //themeSettings = ddlThemes.SelectedItem.Text;

            //if (themeSettings == null)
            //{
            //    UserSettings objUserSettings = new UserSettings();
            //    objUserSettings.LoginSettings = loginSettings;
            //    objUserSettings.PrivacySettings = privacySettings;
            //    objUserSettings.FontTypeSettings = fontTypeSettings;
            //    objUserSettings.FontColorSettings = fontColorSettings;
            //    objUserSettings.BackgroundColorSettings = backgroundColorSettings;

            //    BinaryFormatter serializer = new BinaryFormatter();
            //    MemoryStream memStream = new MemoryStream();
            //    Byte[] byteArray;
            //    serializer.Serialize(memStream, objUserSettings);
            //    byteArray = memStream.ToArray();

            //    objCommand.CommandType = CommandType.StoredProcedure;
            //    objCommand.CommandText = "StoreUserSettings";


            //    objCommand.Parameters.AddWithValue("@theUserSettings", byteArray);

            //    int retVal = objDB.DoUpdateUsingCmdObj(objCommand);

            //    if (retVal > 0)
            //    {
            //        lblSaveINFO.Text = "Your settings were successfully saved!";
            //    }
            //    else
            //    {
            //        lblSaveINFO.Text = "Oops, a problem occured while storing your settings.";
            //    }
            //}
            //else
            //{
            //    UserSettings objUserSettings = new UserSettings();
            //    objUserSettings.LoginSettings = loginSettings;
            //    objUserSettings.PrivacySettings = privacySettings;
            //    objUserSettings.ThemeSettings = themeSettings;

            //    BinaryFormatter serializer = new BinaryFormatter();
            //    MemoryStream memStream = new MemoryStream();
            //    Byte[] byteArray;
            //    serializer.Serialize(memStream, objUserSettings);
            //    byteArray = memStream.ToArray();

            //    objCommand.CommandType = CommandType.StoredProcedure;
            //    objCommand.CommandText = "StoreUserSettings";

            //    objCommand.Parameters.AddWithValue("@theUserSettings", byteArray);

            //    int retVal = objDB.DoUpdateUsingCmdObj(objCommand);

            //    if (retVal > 0)
            //    {
            //        lblSaveINFO.Text = "Your settings were successfully saved!";
            //    }
            //    else
            //    {
            //        lblSaveINFO.Text = "Oops, a problem occured while storing your settings.";
            //    }


            //}
        }
        //protected void Button1_Click(object sender, EventArgs e)
        //{
        //    Label4.Text = Checker.GoodLikesInput(txtLikes.Text);
        //}

        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            System.Threading.Thread.Sleep(2000);
            objDBhelper = new FaceBookHelper.DataBaseRequest();

            if ((txtFirstName.Text == "") || (txtLastName.Text == "") || (txtPhoneNumber.Text == "") || (txtAddress.Text == "") || (txtEmail.Text == "") || (txtUserName.Text == "") || (txtPassWord.Text == "") || (txtLikes.Text == "") || (txtCity.Text == "") || (txtState.Text == ""))
            {
                lblSubmitInfo.Visible = true;
                lblSubmitInfo.Text    = "*All Fields Have To Be Filled Out*";
            }
            else
            {
                lblSubmitInfo.Visible = false;

                String firstName   = txtFirstName.Text;
                String lastName    = txtLastName.Text;
                String phoneNumber = txtPhoneNumber.Text;
                String address     = txtAddress.Text;
                String email       = txtEmail.Text;
                String userName    = txtUserName.Text;
                String passWord    = txtPassWord.Text;

                String security1 = txtQuestion1.Text;
                String security2 = txtQuestion2.Text;
                String security3 = txtQuestion3.Text;
                String likes     = txtLikes.Text;
                String city      = txtCity.Text;
                String state     = txtState.Text;

                if (!Checker.AllAlphabetChars(city))
                {
                    lblCityInfo.Visible = true;
                    lblCityInfo.Text    = "*Only Alphabetical Characters Allowed*";
                }
                else
                {
                    lblCityInfo.Visible = false;
                }

                if (!Checker.AllAlphabetChars(state))
                {
                    lblStateInfo.Visible = true;
                    lblStateInfo.Text    = "*Only Alphabetical Characters Allowed*";
                }
                else
                {
                    lblStateInfo.Visible = false;
                }

                if (!Checker.AllAlphabetChars(firstName))
                {
                    lblFirstNameInfo.Visible = true;
                    lblFirstNameInfo.Text    = "*Only Alphabetical Characters Allowed*";
                }
                else
                {
                    lblFirstNameInfo.Visible = false;
                }

                if (!Checker.AllAlphabetChars(lastName))
                {
                    lblLastNameInfo.Visible = true;
                    lblLastNameInfo.Text    = "*Only Alphabetical Characters Allowed*";
                }
                else
                {
                    lblLastNameInfo.Visible = false;
                }


                if (!Checker.ValidPhoneNumber(phoneNumber))
                {
                    lblPhoneNumberInfo.Visible = true;
                    lblPhoneNumberInfo.Text    = "*Vailid Format* <br/> Correct Format: 123-123-4567 ";
                }
                else
                {
                    lblPhoneNumberInfo.Visible = false;
                }

                if (!Checker.GoodEmailAddress(email))
                {
                    lblEmailInfo.Visible = true;
                    lblEmailInfo.Text    = "*Invaild Email Format* <br/> Correct Format: <br/> [email protected] or [email protected] or [email protected]";
                }
                else
                {
                    lblEmailInfo.Visible = false;
                }

                Boolean passwordsMatch = false;
                if ((txtPassWord.Text != txtConfirmPassword.Text))
                {
                    lblConfirmPassWord.Visible = true;
                    lblConfirmPassWord.Text    = "*Your Passwords don't match*";
                    passwordsMatch             = false;
                }
                else
                {
                    lblConfirmPassWord.Visible = false;
                    passwordsMatch             = true;
                }

                //code here to check the txtLikes feild... the list of things the user likes to do has to be seperated by a comma

                //likes = objDBhelper.GoodLikesInput(likes);
                String modifedLikesInput = Checker.GoodLikesInput(likes);

                //code here to check the txtLikes feild... the list of things the user likes to do has to be seperated by a comma

                if ((Checker.AllAlphabetChars(firstName)) && (Checker.AllAlphabetChars(lastName)) && (Checker.ValidPhoneNumber(phoneNumber)) && (Checker.GoodEmailAddress(email)) && (passwordsMatch) && (Checker.AllAlphabetChars(city)) && (Checker.AllAlphabetChars(state)))
                {
                    int    test             = Convert.ToInt32(radLoginPreferences.SelectedValue);
                    String loginPreferences = "";
                    switch (test)
                    {
                    case 1:
                        loginPreferences = "None";
                        break;

                    case 2:
                        loginPreferences = "Fast";
                        break;

                    case 3:
                        loginPreferences = "Auto";
                        break;

                    default:
                        break;
                    }

                    lblSubmitInfo.Visible = false;

                    int goodUsernamePassword = objDBhelper.CreateUser(firstName, lastName, phoneNumber, address, email, userName, passWord, security1, security2, security3, DropDownListQuestionSet1.SelectedValue, DropDownListQuestionSet2.SelectedValue, DropDownListQuestionSet3.SelectedValue, loginPreferences, modifedLikesInput, city, state);
                    //if the username/password combo is not already taken than a user is created and added to the table

                    //the return from the "CreateUser" method will be an int
                    //0 = means the username/password combo is not in the system yet
                    // andything other than 0 means the username/password combo exists and the UserID of that user with this username/password combo is returned
                    if (goodUsernamePassword == 0)
                    {
                        lblSubmitInfo.Visible = true;
                        lblSubmitInfo.Text    = "*Account Created*";

                        //code here to update the SettingsObject record in the database table for this user//
                        DataSet dsUserRecord = objDBhelper.GetUserRecordWithUsernamePassword(userName, passWord); //pulls User record linked to valid username/password combo
                        for (int i = 0; i < dsUserRecord.Tables.Count; i++)                                       //loops through User record and creates a new cookie with all information linked to the User
                        {
                            int userID = int.Parse(dsUserRecord.Tables[0].Rows[i]["UserID"].ToString());
                            SerializeAndDeserializing.SerializingUserSettingsOBJ(userID, loginPreferences, "background-color:#dfe3ee");

                            if (Request.Cookies["CIS3342_CookieCustom"] != null)
                            {
                                Response.Cookies["CIS3342_CookieCustom"].Expires = DateTime.Now.AddDays(-1);
                            }

                            HttpCookie myCookie = new HttpCookie("CIS3342_Cookie");

                            myCookie.Values["userID"]      = dsUserRecord.Tables[0].Rows[i]["UserID"].ToString();
                            myCookie.Values["firstName"]   = dsUserRecord.Tables[0].Rows[i]["FirstName"].ToString();
                            myCookie.Values["lastName"]    = dsUserRecord.Tables[0].Rows[i]["LastName"].ToString();
                            myCookie.Values["phoneNumber"] = dsUserRecord.Tables[0].Rows[i]["PhoneNumber"].ToString();

                            myCookie.Values["City"]      = dsUserRecord.Tables[0].Rows[i]["City"].ToString();
                            myCookie.Values["State"]     = dsUserRecord.Tables[0].Rows[i]["State"].ToString();
                            myCookie.Values["PhotoPath"] = dsUserRecord.Tables[0].Rows[i]["PhotoPath"].ToString();
                            myCookie.Values["Likes"]     = dsUserRecord.Tables[0].Rows[i]["Likes"].ToString();

                            myCookie.Values["address"] = dsUserRecord.Tables[0].Rows[i]["Address"].ToString();
                            myCookie.Values["email"]   = dsUserRecord.Tables[0].Rows[i]["Email"].ToString();

                            myCookie.Values["userName"] = dsUserRecord.Tables[0].Rows[i]["UserName"].ToString();
                            //myCookie.Values["passWord"] = dsUserRecord.Tables[0].Rows[i]["PassWord"].ToString();
                            myCookie.Values["passWord"] = crypto.PerformEncryption(dsUserRecord.Tables[0].Rows[i]["PassWord"].ToString());//encrypts password!

                            myCookie.Values["security1"] = dsUserRecord.Tables[0].Rows[i]["Security1"].ToString();
                            myCookie.Values["security2"] = dsUserRecord.Tables[0].Rows[i]["Security2"].ToString();
                            myCookie.Values["security3"] = dsUserRecord.Tables[0].Rows[i]["Security3"].ToString();

                            myCookie.Values["Security1Question"] = dsUserRecord.Tables[0].Rows[i]["Security1Question"].ToString();
                            myCookie.Values["Security2Question"] = dsUserRecord.Tables[0].Rows[i]["Security2Question"].ToString();
                            myCookie.Values["Security3Question"] = dsUserRecord.Tables[0].Rows[i]["Security3Question"].ToString();

                            myCookie.Values["WallPost"] = dsUserRecord.Tables[0].Rows[i]["WallPost"].ToString();

                            myCookie.Values["loginPreferences"] = dsUserRecord.Tables[0].Rows[i]["loginPreferences"].ToString();

                            myCookie.Values["LastVisited"] = DateTime.Now.ToString();
                            myCookie.Expires = new DateTime(2025, 1, 1);

                            Response.Cookies.Add(myCookie);
                        }
                        //code here to update the SettingsObject record in the database table for this user//



                        int adjustSettingsNowValue = Convert.ToInt32(radAdjustSettingsNow.SelectedValue);
                        switch (adjustSettingsNowValue)
                        {
                        case 1:    // user selects no, they do not want to change these setting now
                            Response.Redirect("Home.aspx");
                            break;

                        case 2:    //user selects yes, they do not want to change these setting now
                            Response.Redirect("GeneralAccountSettings.aspx");
                            break;

                        default:
                            break;
                        }
                    }
                    else //goodUsernamePassword is not 0
                    {
                        lblSubmitInfo.Visible = true;
                        lblSubmitInfo.Text    = "*Username/Password combination is already taken**";
                    }
                }
                else
                {
                    lblSubmitInfo.Visible = true;
                    lblSubmitInfo.Text    = "*One Or More Fields Are Invalid*";
                }
            }
        }
Exemple #5
0
        public void FillALlRecordsFromGetUserFriendsTable()
        {
            objDBhelper = new FaceBookHelper.DataBaseRequest();

            DataSet allFriendRequests = objDBhelper.GetUserFriendsTable();

            for (int i = 0; i < allFriendRequests.Tables[0].Rows.Count; i++)
            {
                int    userFriendID = int.Parse(allFriendRequests.Tables[0].Rows[i]["UserFriendID"].ToString());
                String friend1      = allFriendRequests.Tables[0].Rows[i]["Friend1"].ToString();
                String friend2      = allFriendRequests.Tables[0].Rows[i]["Friend2"].ToString();
                String status       = allFriendRequests.Tables[0].Rows[i]["Status"].ToString();
                String firstName    = allFriendRequests.Tables[0].Rows[i]["FirstName"].ToString();
                String lastName     = allFriendRequests.Tables[0].Rows[i]["LastName"].ToString();

                String friend1FirstName = allFriendRequests.Tables[0].Rows[i]["Friend1FirstName"].ToString();
                String friend1LastName  = allFriendRequests.Tables[0].Rows[i]["Friend1LastName"].ToString();

                ///////// code here to add record to ArrayList
                objDBhelper.AddRequestToListofFriendRequests(userFriendID, friend1, friend2, status, firstName, lastName, friend1FirstName, friend1LastName);
            }

            ArrayList allFriendRequest   = objDBhelper.friendRequest; //an ArrayList will all friend requests in the system
            ArrayList idOfAllYourFriends = new ArrayList();           //A list of all your friends

            HttpCookie myCookie = Request.Cookies["CIS3342_Cookie"];
            String     myUserID = myCookie.Values["userID"];

            foreach (FriendRequest item in allFriendRequest)
            {
                if (item.Status == "true")
                {
                    if ((item.Friend1 == myUserID) || (item.Friend2 == myUserID))
                    {
                        idOfAllYourFriends.Add(item);
                    }
                }
            }

            ///////////////////////////////////////////////////////////////
            DataSet dsUserRecords = objDBhelper.GetAllUsersInTable();

            for (int i = 0; i < dsUserRecords.Tables[0].Rows.Count; i++)
            {
                int    userID      = int.Parse(dsUserRecords.Tables[0].Rows[i]["UserID"].ToString());
                String fName       = dsUserRecords.Tables[0].Rows[i]["FirstName"].ToString();
                String lName       = dsUserRecords.Tables[0].Rows[i]["LastName"].ToString();
                String phoneNumber = dsUserRecords.Tables[0].Rows[i]["PhoneNumber"].ToString();
                String address     = dsUserRecords.Tables[0].Rows[i]["Address"].ToString();
                String email       = dsUserRecords.Tables[0].Rows[i]["Email"].ToString();
                String userName    = dsUserRecords.Tables[0].Rows[i]["UserName"].ToString();
                String passWord    = dsUserRecords.Tables[0].Rows[i]["PassWord"].ToString();
                String security1   = dsUserRecords.Tables[0].Rows[i]["Security1"].ToString();
                String security2   = dsUserRecords.Tables[0].Rows[i]["Security2"].ToString();
                String security3   = dsUserRecords.Tables[0].Rows[i]["Security3"].ToString();

                String security1Question = dsUserRecords.Tables[0].Rows[i]["Security1Question"].ToString();
                String security2Question = dsUserRecords.Tables[0].Rows[i]["Security2Question"].ToString();
                String security3Question = dsUserRecords.Tables[0].Rows[i]["Security3Question"].ToString();

                String likes            = dsUserRecords.Tables[0].Rows[i]["Likes"].ToString();
                String photoPath        = dsUserRecords.Tables[0].Rows[i]["PhotoPath"].ToString();
                String city             = dsUserRecords.Tables[0].Rows[i]["City"].ToString();
                String state            = dsUserRecords.Tables[0].Rows[i]["State"].ToString();
                String loginPreferences = dsUserRecords.Tables[0].Rows[i]["loginPreferences"].ToString();

                String wallPost = dsUserRecords.Tables[0].Rows[i]["WallPost"].ToString();
                ////add code here to add each record to the ArrayList
                objDBhelper.AddUserArrayListofUsers(userID, fName, lName, phoneNumber, address, email, userName, security1, security2, security3, passWord, security1Question, security2Question, security3Question, loginPreferences, likes, photoPath, city, state, wallPost);
            }

            ArrayList yourPersonalFriendList = new ArrayList();

            foreach (User user in objDBhelper.userArrayList)
            {
                if (user.UserID.ToString() != myUserID)//prevents you from adding yourself to your friends list
                {
                    foreach (FriendRequest friendRequest in idOfAllYourFriends)
                    {
                        if ((user.UserID.ToString() == friendRequest.Friend1) || (user.UserID.ToString() == friendRequest.Friend2))
                        {
                            yourPersonalFriendList.Add(user);
                        }
                    }
                }
            }
            YourFrindListRepeater.DataSource = yourPersonalFriendList;
            YourFrindListRepeater.DataBind();

            ////code here to populate newsfeed////
            char[] targetChar = { '~' };

            String wallPostString = "";
            String allNewsFeed    = "";

            foreach (User user in yourPersonalFriendList)
            {
                allNewsFeed += user.FirstName.ToString() + " " + user.LastName.ToString() + "'s news feed! \n";

                wallPostString = "";
                String[] posts = user.WallPost.Split(targetChar);

                for (int i = 0; i < posts.Length; i++)
                {
                    wallPostString += posts[i] + "\n ";
                }

                allNewsFeed += wallPostString;

                allNewsFeed += " \n";
            }

            txtNewsFeed.Text = allNewsFeed;
            ////code here to populate newsfeed////
        }