- When the web page loads, the "Email" property contained in the query string passed from the "MemberHome.aspx" web page is stored in a
private
instance variable "Email" of typestring
- A "Click here to return to your Face Pamphlett Member Homepage"
asp:Button
control that when clicked submits theprivate
instance variable "Email" in a query string to the "MemberHome.aspx" Web page
- An
asp:SqlDataSource
control that returns your friend's 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 for the record that matches the "EMail" property stored in the query string passed from the the hyperlink field in the "MemberHome.aspx" Web page
- This
SqlDataSource
is linked to anasp:DetailsView
control as per the image below which uses theEval
function to display the concatenated "MemberName" and the "Email" fields in theHeaderTemplate
- 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
orRepeater
to customize the "Member" information part of this Web page)
- 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 anasp:GridView
control as per the image below- When the
SqlDataSource
executes and returns no records, display the message "Currently has no posts" in theGridView
- An
asp:SqlDataSource
control that returns the MyEmail and FriendEMail fields from the Friends table as well as the FirstName field from the Members tables as well as the FirstName concatenated to the LastName field (with a space between) as alias MemberName, for those records in which the "MyEmail" field matches the "EMail" property stored in the query string passed from the the hyperlink field in the "MemberHome.aspx" Web page
- This
SqlDataSource
is linked to anasp:GridView
control as per the image above- When the
SqlDataSource
executes and returns no records, display the message "Currently has no friends" in theGridView