hi,
i'm working on learning vb scripting in asp.net client side, and i've run into a little snag. i'm sure its possible, how would you call / instantiate a class in vb script. i know you can call it in the code behind but i need to work on client side.
Code:
[blue]<script language="VB" runat="server">
dim m_DataLayer as DataLayer
[black]Errors out here, message 'BC30002: Type 'DataLayer' is not defined.'[/black]
dim m_CheckResults as CheckResults
Sub Page_Load(Src As Object, E As EventArgs)
If Not (IsPostBack)
ViewState("PanelIndex") = 0
Division_Set(True)
End If
End Sub
Function Division_Set(ByVal clearData As Boolean) As Boolean
'Returns TRUE if successful
Do
Dim dlResult As DataLayerResult = m_DataLayer.GetDivision(clearData)
'process the result
Select Case m_CheckResults.CheckResult(dlResult)
Case ResultStatus.Failure
Return False
Case ResultStatus.Success
Return True
End Select
Loop
End Function
</script>
[/blue]
?Question?
m_DataLayer is middle tier datalayer (vb class, functions and variables) that accesses the web service. how would i instantiate the datalayer to m_DataLayer...or is this only possible on the code behind?
any ides would be greatly appreciated.
thanks!
i'm working on learning vb scripting in asp.net client side, and i've run into a little snag. i'm sure its possible, how would you call / instantiate a class in vb script. i know you can call it in the code behind but i need to work on client side.
Code:
[blue]<script language="VB" runat="server">
dim m_DataLayer as DataLayer
[black]Errors out here, message 'BC30002: Type 'DataLayer' is not defined.'[/black]
dim m_CheckResults as CheckResults
Sub Page_Load(Src As Object, E As EventArgs)
If Not (IsPostBack)
ViewState("PanelIndex") = 0
Division_Set(True)
End If
End Sub
Function Division_Set(ByVal clearData As Boolean) As Boolean
'Returns TRUE if successful
Do
Dim dlResult As DataLayerResult = m_DataLayer.GetDivision(clearData)
'process the result
Select Case m_CheckResults.CheckResult(dlResult)
Case ResultStatus.Failure
Return False
Case ResultStatus.Success
Return True
End Select
Loop
End Function
</script>
[/blue]
?Question?
m_DataLayer is middle tier datalayer (vb class, functions and variables) that accesses the web service. how would i instantiate the datalayer to m_DataLayer...or is this only possible on the code behind?
any ides would be greatly appreciated.
thanks!