- The <Logout> Button which starts the page and redirects the application to the "Login.aspx" page
- When the web page loads, the "Email" property contained in the query string passed from the "Login.aspx" web page is stored in a
private
instance variable "Email" of typestring
- An asp:SqlDataSource control that returns the EMail and FirstName (the FirstName is used to generate the URL to display the image) fields from the Members table as well as the "FirstName" concatenated to the "LastName" field (with a space between) as alias MemberName (see Note below) for the record that matches the "EMail" property stored in the query string passed from the click event of the "Submit" button in the "Login.aspx" web page
Note: For a review of how to create concatenated columns in a SQL SELECT statement (this was a CST171 topic), click this String Concatenation (Transact-SQL) link and view Examples "A. Using string concatenation"
- This SqlDataSource is linked to an asp:DetailsView control as per the image below
- The link to the image is based upon the "FirstName" field concatenated to the string ".jpg"
- (Since the output in this control looks a little bit "clutsy" you alternately might consider using one of the ASP.NET templated data controls such as ListView, FormView or Repeater to customize the "Member" information part of this web page)
- Next implement an asp:SqlDataSource control that returns the Post and PostDate fields from the Posts table for those records that match the EMail property stored in the query string passed from the click event of the "Submit" button in the "Login.aspx" web page; these records should be returned in descending order by the "PostDate" field
- This SqlDataSource is linked to an asp:GridView control as per the image below
- When the SqlDataSource executes and returns no records, display the message "You currently have no posts" in the GridView
- Following the GridView control is an asp:Button control (only if you complete #6 below, the "Insert Posts" page) that when clicked submits the
private
instance variable "Email" as a query string value to the "InsertPost.aspx" web page
- An asp:SqlDataSource control that returns the MyEmail and FriendEMail fields from the Friends table and additionally the FirstName (the FirstName is used to generate the URL to display the image) field from the Members tables as well as the FirstName concatenated to the LastName field (with a space between) as alias MemberName, joined on the EMail field in the Members table and the FriendEmail field in the Friends table for those records in which the MyEmail field matches the EMail property stored in the query string passed from the click event of the "Submit" button in the "Login.aspx" web page
- This SqlDataSource is linked to an asp:GridView control as per the image below, including a hyperlink field which is a link to the "FriendInfo.aspx" web page (only if you complete item #8 below, the "Friends Info" page) in which it passes the
private
instance variable "Email" and the "FriendEmail" field within a query string to the "FriendsInfo.aspx" web page- When the SqlDataSource executes and returns no records, display the message "You currently have no friends" in the GridView
- Following the GridView control is an asp:Button control (only if you complete #7 below, the "Insert Friend" page) that when clicked submits the
private
instance variable "Email" as a query string value to the "InsertFriend.aspx" web page