[ASP.NET C#]creer tableau HTML Dynamiquement
MicroPlemousse
Messages postés
3
Date d'inscription
Statut
Membre
Dernière intervention
-
bilorou -
bilorou -
Salut a tous!
Voila je developpe une appli en ASP.NET codé C# et jaurai aimer savoir comment creer dynamiquement un tableau HTML a partir un code Behind C#
en realité ca serai un enorme coup de pousse pour que je realise ce genre de chose :
http://olance.developpez.com/articles/web/javascript/modification-inline/exemple/
Je vous remerci d'avance :)
Voila je developpe une appli en ASP.NET codé C# et jaurai aimer savoir comment creer dynamiquement un tableau HTML a partir un code Behind C#
en realité ca serai un enorme coup de pousse pour que je realise ce genre de chose :
http://olance.developpez.com/articles/web/javascript/modification-inline/exemple/
Je vous remerci d'avance :)
A voir également:
- [ASP.NET C#]creer tableau HTML Dynamiquement
- Asp.net download - Télécharger - Divers Web & Internet
- Asp.net 2.0 download - Télécharger - Divers Utilitaires
- Asp.net machine account ✓ - Forum Windows
- ASP.NET 2.0 - Forum Windows
- [ASP.Net] Html.DropDownListFor ✓ - Forum Framework .NET
2 réponses
En fait tu peux recupérer ton traitement dans un "label" préalablement préparé pour recevoir les ligne de ton tableau
Exemple
1. Coté page aspx
<body>
<form id="form1" runat="server">
<table cellpadding="0" cellspacing="1"><tr><td style="width: 696px">
<asp:Label ID="Lbl_fichier" runat="server" Text="Label" Height="25px" Width="784px"></asp:Label>
</table>
</form>
</body>
2. Coté scrip cs - page aspx.cs
//traitement prealable
// une boucle par exemple
for ( int i=0 ; (i<tableau.Length)&&(tableau[i]!=0) ; i++ ) Lbl_fichier.Text += "<tr><td>"+ tableau[i] + "<td></td>";
Exemple
1. Coté page aspx
<body>
<form id="form1" runat="server">
<table cellpadding="0" cellspacing="1"><tr><td style="width: 696px">
<asp:Label ID="Lbl_fichier" runat="server" Text="Label" Height="25px" Width="784px"></asp:Label>
</table>
</form>
</body>
2. Coté scrip cs - page aspx.cs
//traitement prealable
// une boucle par exemple
for ( int i=0 ; (i<tableau.Length)&&(tableau[i]!=0) ; i++ ) Lbl_fichier.Text += "<tr><td>"+ tableau[i] + "<td></td>";