I have an integer variable Purchaser1PersonKey that I would like to pass as a session variable to another page. I have made
Purchaser1PersonKey the CommandArgument of my LinkButton.
I must be doing something wrong because when I breakpoint on response. redirect the session variable is empty. Any help will be appreciated. Thank you.
link button markup is here:
<asp:LinkButton ID="lnkPurchaser1" class="linkbutton" runat="server" CommandName="GoToPurchaser1"
CommandArgument='<%=Purchaser1PersonKey %>' OnCommand="lnkPurchaser1_Command"><%=Purchaser1FName & " " & Purchaser1LName%></asp:LinkButton>
Here is sub that processes the link command:
Protected Sub lnkPurchaser1_Command(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.CommandEventArgs)
Session("personid") = e.CommandArgument.ToString
Response.Redirect("PeopleDetail.aspx")
End Sub