I'm an ASP .Net newbie and need some help. Does ASP .NET support what I
consider a "structure" or an "associativ e array"?
I'm look for a data type that will hold a key name and a value such as this
pseudo code below:
Dim EmployeeInfoas (Structure or Associative Array?? What data type
here???)
'Add key and value:
Employee.Add(<k ey>, <value>)
Employee.Add("F ullName","John Smith")
Employee.Add("P hone","555-5555")
'And then be referenced in this type of manner:
response.write( "Employee Name: " & Employee("FullN ame") & "<BR>")
response.write( "Phone: " & Employee("Phone "))
'Or maybe there's a "Get" method or something... like Employee.Get("P hone")
and the web page would write out:
Employee Name: John Smith
Phone: 555-5555
The point is I'd like to use a string value to identify an index in an
array, not an integer. Can anyone point me in the right direction here? Is
this even possible? Please advise.
Thanks,
-Joe
consider a "structure" or an "associativ e array"?
I'm look for a data type that will hold a key name and a value such as this
pseudo code below:
Dim EmployeeInfoas (Structure or Associative Array?? What data type
here???)
'Add key and value:
Employee.Add(<k ey>, <value>)
Employee.Add("F ullName","John Smith")
Employee.Add("P hone","555-5555")
'And then be referenced in this type of manner:
response.write( "Employee Name: " & Employee("FullN ame") & "<BR>")
response.write( "Phone: " & Employee("Phone "))
'Or maybe there's a "Get" method or something... like Employee.Get("P hone")
and the web page would write out:
Employee Name: John Smith
Phone: 555-5555
The point is I'd like to use a string value to identify an index in an
array, not an integer. Can anyone point me in the right direction here? Is
this even possible? Please advise.
Thanks,
-Joe
Comment