E Emanuele Aug 16, 2004 #1 How can I set/get values of a webform from the values of the properties of a class? Does exist some function that do it? gracias
How can I set/get values of a webform from the values of the properties of a class? Does exist some function that do it? gracias
P Paul Glavich [MVP - ASP.NET] Aug 16, 2004 #2 I am not sure I fully understand your request. Could you provide an example scenario to better illustrate what you would like to do.
I am not sure I fully understand your request. Could you provide an example scenario to better illustrate what you would like to do.
K Karl Aug 16, 2004 #3 Not 100% sure I understand, but you should be able to do: VB.Net --> <%# Ctype(Container.DataItem, YOURCLASS).PROPERTY %> C# <%# ((YOURCLASS)Container.DataItem).PROPERTY %> You might need to <%@ Import NameSpace="namespace.of.your.class" %> at the top Karl
Not 100% sure I understand, but you should be able to do: VB.Net --> <%# Ctype(Container.DataItem, YOURCLASS).PROPERTY %> C# <%# ((YOURCLASS)Container.DataItem).PROPERTY %> You might need to <%@ Import NameSpace="namespace.of.your.class" %> at the top Karl
E Emanuele Aug 16, 2004 #4 ok.. it solves 50% of my problem... now I need to update values of my object (all the properties of the class) from the values of the textboxes of my page... Example: MyClass.Name ----> txtName.text MyClass.Surname ----> txtSurname.text MyClass.Address ----> txtAddress.text thank's!
ok.. it solves 50% of my problem... now I need to update values of my object (all the properties of the class) from the values of the textboxes of my page... Example: MyClass.Name ----> txtName.text MyClass.Surname ----> txtSurname.text MyClass.Address ----> txtAddress.text thank's!
K Karl Aug 16, 2004 #5 The only way to do that is manually as far as I know. When the save button is hit, you need to get your object and manually update it MyClass.Name = txtName.text there's no mapping available. Karl
The only way to do that is manually as far as I know. When the save button is hit, you need to get your object and manually update it MyClass.Name = txtName.text there's no mapping available. Karl