Re: Bind controls to class properties

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Emanuele (emanuele75_at_telefonica.net)
Date: 08/16/04


Date: Mon, 16 Aug 2004 14:51:38 +0200

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!

"Karl" <none> ha scritto nel messaggio
news:uneWzw4gEHA.2544@TK2MSFTNGP10.phx.gbl...
> 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
>
> "Emanuele" <emanuele75@telefonica.net> wrote in message
> news:OK3pQZ3gEHA.3612@TK2MSFTNGP12.phx.gbl...
> > 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;)
> >
> >
>
>