A click on the linkbutton will fire some javascript (window.open) and open up a child browser window. I have to [securely] send over some text as well. I thought to send this text over to the new window using a session variable. This text that is to be sent over must not under any circumstances be visible client-side.

The trouble is that the javascript fires before the session variable can be set.

Any ideas?



Code:
Dim hl As LinkButton = New LinkButton
hl.ID = "hl" & Panel1.Controls.Count + 1
hl.Text = Title
hl.CssClass = "blockNewsLink"
hl.Attributes.Add("onclick", "return newswin('headlines.aspx');")
hl.CommandArgument = Link
AddHandler hl.Click, AddressOf bravka
Panel1.Controls.Add(hl)
Code:
Sub bravka(ByVal sender As Object, ByVal e As System.EventArgs)
     Session("bravka") = CType(sender, LinkButton).CommandArgument
End Sub