Last post Mar 13, 2009 01:39 AM by asifchouhan
Mar 12, 2009 10:32 PM|tvb2727|LINK
I am trying to return a structure from a class.vb file to an aspx page. Is this possible, if so how would you do it in the aspx page and the class.vb file? Thanks.
Mar 13, 2009 01:39 AM|asifchouhan|LINK
'Class contianing a structurePublic Class TestClass Public Structure TestStruct Dim Id As Integer Dim name As String End Structure Public Function ReturnTest(ByVal ID As Integer, ByVal name As String) As TestStruct Dim ts As New TestStruct() ts.Id = ID ts.name = name Return ts End FunctionEnd Class 'Calling the class and using the structureDim tc As New TestClassDim ts As TestClass.TestStruct = tc.ReturnTest(1, "Bill")
If your issue is solved. Mark it as "ANSWER"