return a collection from class

T

TJS

from a code class,
a] how does one dimension a collection and then
b] after it is created, reassign it in the page ?

I'm getting only errors on line of code in the page.
"System.NullReferenceException: Object variable or With block variable not
set "




example :
------------------
function buildmenu ()
dim mymenu as ??

[...code here...]

return mymenu
end function


in the page should this work to reassign menu collection??

<Script runat="server">
mymenu = myObject.Buildmenu () '<= errors here
....
</script>

<mycontrol:menu id="mymenu" runat="server">
 
K

Kevin Spencer

A Collection is a class, just like an Integer, String, or an Object.
Everything in .Net is a class. IOW, treat it like you would an Integer,
String, or Object.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,277
Latest member
VytoKetoReview

Latest Threads

Top