Hello everybody,


Can anyone please explain me a solution or workaround for my following problem ?

When I want to pass a session variable with a postback, then I always need to click the button twice !

Here's my code :

VB Code:
  1. Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
  2.         'CODEGEN: This method call is required by the Web Form Designer
  3.         'Do not modify it using the code editor.
  4.  
  5.         Response.Write(Session("myTest"))
  6.         InitializeComponent()
  7.     End Sub
  8.  
  9. #End Region
  10.  
  11.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  12.         Session("myTest") = "testing"
  13.     End Sub

There's only one button on the page, nothing else ! I need to click twice the button before I can see testing ...
(it's with a postback)

I really don't know anymore how I can solve this !

Thanks in advance,

Bjorn