Link to home
Start Free TrialLog in
Avatar of Laurent Bar
Laurent BarFlag for France

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.
ASKER CERTIFIED SOLUTION
Avatar of OklahomaDave
OklahomaDave

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Laurent Bar

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...