Hi, i need help with a little problem about 'Session'
Look at this piece of code:
<@ Page Language="VB" EnableSessionState="True" >
<script runat="server">
Dim st As String
Sub Page_Load()
st="computer"
Session("mystring")=st
End Sub
Sub bt_click(o As Object, e As EventArgs)
Dim st2 As String = Session("mystring")
tbox.Text=st2
End Sub
</script>
<form runat="server">
<asp:Button id="bt1" onclick="bt_click" Text="..." runat="server" />
<asp:TextBox id="tbox" runat="server" />
</form>
When I click the button I´d like to see the word "computer" in the textbox, but nothing appears.
What is wrong in this code ?
what I really want is have the changes made to st in the page_load sub, available in the bt_click sub.
Is there a way to do this without using Session ?
Thanks
:thumb:
