This is continued from link button in repeater to pass session variable but nothing happens when I try to click the link button I added to my repeater. Here is what I have
<asp:Repeater ID="rptList" runat="server"
EnableViewState="false"
OnItemCommand="rptList_ItemCommand"
DataSourceID="SqlDataSource3">
<ItemTemplate>
<div>
<p>
<b>Title: </b> <asp:LinkButton ID="lbnCookieVar" CommandName="click" CommandArgument='<%# Eval("Job_Title")%>' Text='<%# Eval("Job_Title")%>' runat="server" /> <br />
<b>Status: </b><%# Eval("Status")%><br />
<b>Department: </b><%# Eval("Department")%><br />
<b>Date Position Available: </b><%# Eval("Date_Position_Available")%><br />
</p>
</div>
</ItemTemplate>
</asp:Repeater>
Code Behind:
protected void rptList_ItemCommand(object sender, CommandEventArgs e)
{
if (e.CommandName == "click")
{
Session["Data"] = e.CommandArgument.ToString();
Response.Redirect("default.aspx");
}
}
I apologize for the new post but for whatever reason I was not allowed post on the last one kept saying "User not alllowed to comment to this post"