O
Oenone
Is it possible to create an object which can have methods and properties,
but which can also be treated as a string?
I'm trying to create a wrapper around the IIS Request.Form object which
behaves the same as the classic ASP object behaved. This will allow me to
quickly get a large amount of code up and running (I can then tweak it to
not require this wrapper at a more leisurely pace).
When queried directly, this object returns a string containing elements
submitted on a web form, for example:
Debug.Print MyObj.Form
Field1=Value1&Field2=Value2&Checkbox=on
It is also possible to query properties on this same object, however, as
follows:
Debug.Print MyObj.Form.Count
3
Debug.Print MyObj.Form.Item("Field1")
Value1
Is there any way to create an object in VB.net which behaves in the same way
as this?
Many thanks,
but which can also be treated as a string?
I'm trying to create a wrapper around the IIS Request.Form object which
behaves the same as the classic ASP object behaved. This will allow me to
quickly get a large amount of code up and running (I can then tweak it to
not require this wrapper at a more leisurely pace).
When queried directly, this object returns a string containing elements
submitted on a web form, for example:
Debug.Print MyObj.Form
Field1=Value1&Field2=Value2&Checkbox=on
It is also possible to query properties on this same object, however, as
follows:
Debug.Print MyObj.Form.Count
3
Debug.Print MyObj.Form.Item("Field1")
Value1
Is there any way to create an object in VB.net which behaves in the same way
as this?
Many thanks,