I'm trying to access a variable I have in the HTML from my Code-Behind either by adding it as a session variable or making it the text of a textbox.
Neither is working.
<%
Dim ItemNo As StringItemNo = Request.QueryString("itemno")
Response.Write(ItemNo)
Session.Add("ItemNo", ItemNo)
%>
<asp:TextBox ID="ItemNo" runat="server" Text='<%# Request.QueryString("itemno") %>'></asp:TextBox>
The value of ItemNo is output to the screen. However, when I try to access Session.Item("ItemNo") from the code behind, I'm having trouble.
I've also tried using the text of a textbox approach as seen above. The textbox doesn't show the text.
What am I doing wrong?