I have a site on which members can select from a list of links (from a ListView in profiles.aspx) in order to view details of another site member (in profile_detail.aspx), using the following code:
profiles.aspx and profiles.aspx.vb
<asp:LinkButton ID="lnkBtnItem" Text="Select" CommandArgument='<%#Eval("UserID") %>' OnCommand="lnkBtn_Command" ForeColor="#FF0000" Font-Bold="true" Font-Size="11px" runat="server" />
Protected Sub lnkBtn_Command(ByVal sender As Object, ByVal e As CommandEventArgs)
Session("UserID") = Convert.ToString(e.CommandArgument)
I would like to do the following tasks but need guidance:
From a completely different page (in other words, not from profiles.aspx this time), the user clicks on a photo of a site member; the program picks up the UserID associated with the photo from a database table and saves it to a session variable; completely bypasses the profiles.aspx page; goes directly to profile_detail.aspx and displays the correct person.
My problem: I don't how to bypass clicking the link on profiles.aspx.
In other words, I want to go directly to profile_detail.aspx and apply the UserID session variable in displaying the person who matches that UserID.