Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling a VB Class from ASP.NET (VB Client Side)

Status
Not open for further replies.

tickko

Programmer
Dec 12, 2002
25
US
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!
 
The scripting you refer to is not client-side (runat="server"). You need to import the namespace that contains DataLayer.



Greetings,
Dragonwell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top