the two labels are Lable A, amd Lable B
Now i have two tables called User Account table and User Connected table
Example
User Connected table
-------------------------------------------------------------------------------------------------------
ID UserName | FriendUserName | Status
--------------------------------------------------------------------------------------------------------
1 Mary22 | Stonek33 | true
-------------------------------------------------------------------------------------------------------
----------------------------------------------------------------- -----------------------------------
2 brown22 | Stonek33 | true
-------------------------------------------------------------------------------------------------------
User Account table
--------------------------------------------------------------------------------
ID UserName
-----------------------------------------------------------------------------------
1 Mary22
-------------------------------------------------------------------------------------
----------------------------------------------------------------------------------
2 brown22
-------------------------------------------------------------------------------------
----------------------------------------------------------------------------------
3 Stonek33
-------------------------------------------------------------------------------------
----------------------------------------------------------------------------------
4 liter22
-------------------------------------------------------------------------------------
So now lets take for example that mary22, Mary22 is connected to Stonek33 and the status of their connection us true, so if mary logs in she wants to see those she is connect to, so when she clicks on names of any
of the users displayed on her page she will be redirected to the users page and she will see the lable showing yes connected.
But you can see from the table that mary22 is not connected to brown22 and so if mary or brown22 visits each others page they will see not connected lable.
i ony created a html of it but i need help on the code behind
HTML
- <asp:FormView ID="FormView1follow" runat="server" OnDataBound="OnDataBound" Width="100%"
- AllowPaging="true" OnPageIndexChanging="OnPageIndexChanging">
- <ItemTemplate>
- <asp:HiddenField ID="hfUserName" runat="server" Value='<%# Eval("UserName") %>' />
- <asp:HiddenField ID="hfFriendsUserName" runat="server" Value='<%# Eval("FriendUserName") %>' />
- <asp:HiddenField ID="hfStatus" runat="server" Value='<%# Eval("Status") %>' />
- <asp:LinkButton ID="btnFriend" runat="server" ToolTip="follow user"
- Font-Bold="True">
- <i class="" style="margin-right: 2px"></i>
- <asp:Label ID="lblFriend" runat="server" Text='<%# Eval("Status") %>' CssClass=" btn btn-twitter fa fa-user"/>
- </asp:LinkButton> <asp:LinkButton ID="btnNotFriend" runat="server" ToolTip="follow user"
- Font-Bold="True">
- <i class="" style="margin-right: 2px"></i>
- <asp:Label ID="lblUnFriend" runat="server" Text='<%# Eval("Status") %>' CssClass=" btn btn-twitter fa fa-user-plus"/>
- </asp:LinkButton>
- </ItemTemplate>
Nilesh SawardekarPosted Aug 10, 2016, 1:43 PM