Laurent Bar
asked on
Bind a TextBox to an object of my page
Dear,
In an ASP.NET Web application I have an ASPX page that contains TextBox.
This page contains an attribute that is an object "Eleve".
At the beginning of my file ASPX.CS I wrote:
public static Eleve objEleveCourant;
In my ASPX page can I bind my TextBox controls directly to a property of my object "objEleveCourant" ?
For example like this:
<asp: TextBox id = "TxtNom" runat = "server" Text ='<%# Bind ("objEleveCourant.nom") %>'></ asp: TextBox>
thank you in advance for your help.
Laurent.
In an ASP.NET Web application I have an ASPX page that contains TextBox.
This page contains an attribute that is an object "Eleve".
At the beginning of my file ASPX.CS I wrote:
public static Eleve objEleveCourant;
In my ASPX page can I bind my TextBox controls directly to a property of my object "objEleveCourant" ?
For example like this:
<asp: TextBox id = "TxtNom" runat = "server" Text ='<%# Bind ("objEleveCourant.nom") %>'></ asp: TextBox>
thank you in advance for your help.
Laurent.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok, Thank you very much !
that's I thought, but I was wondering if there was a solution more automatic.
Maybe in a future version of ASP.NET...