I am trying to pass a parameter in my script sub, I attempted this on an asp page :
<asp:LinkButton ID="LinSoftWares" OnClick="ProductChange(product)" runat="server" >Softwares</asp:LinkButton>
and this for the script :
<script runat="server">
Sub ProductChange(ByVal StrCommand As String)
If StrCommand = "product" Then
If Session("BlnProductShow") = 1 Then
Session("BlnProductShow") = 0
Else
Session("BlnProductShow") = 1
End If
DoRefresh()
End If
End Sub
Sub DoRefresh()
If Session("BlnProductShow") = 1 Then
DivProduct.Style.Value = "visibility: visible"
Else
DivProduct.Style.Value = "visibility: hidden"
End If
</Sub>
</script>
However, I encountered this error :
'product' is not declared. It may be inaccessible due to its protection level