A
alan
Hi all,
I need to pass a variable to the client-side vbscript and when the button is
pressed invoke the script (SomeSub()).
The problem is, that the "blablabla" appears only after second pressing of
the button.
Probably there is something with the postback, but I cannot figure it out.
My .aspx :
<asp:Button id="Button3" runat="server" Text="Butt"></asp:Button>
<script language="VBscript" type="text/vbscript">
Sub SomeSub()
Dim mystr
mystr = "<%= variable %>"
document.write("variable")
End Sub
</script>
On my .vb file I'v got:
Public variable As String = "blablabla"
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
Button3.Attributes.Add("onclick", "SomeSub()")
End Sub
Please help me.
I need to pass a variable to the client-side vbscript and when the button is
pressed invoke the script (SomeSub()).
The problem is, that the "blablabla" appears only after second pressing of
the button.
Probably there is something with the postback, but I cannot figure it out.
My .aspx :
<asp:Button id="Button3" runat="server" Text="Butt"></asp:Button>
<script language="VBscript" type="text/vbscript">
Sub SomeSub()
Dim mystr
mystr = "<%= variable %>"
document.write("variable")
End Sub
</script>
On my .vb file I'v got:
Public variable As String = "blablabla"
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
Button3.Attributes.Add("onclick", "SomeSub()")
End Sub
Please help me.