Bonjour,
Je débute en ASP.Net et je ne trouve pas le moyen de formater mes données provenant d'une BD comme en ASP !
En ASP j'utilisais toujours <table></table> et je placais mes données où je voulais.
J'ai vu qu'il existait le Datagrid, mais c'est moins souple pour positionner les données.
En .NET il n'y a que le Datagrid pour faire ça ?
Par exemple en ASP :
Y-a-t'il un moyen de faire la même chose en .Net ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63 <% strSql = "SELECT DATENAME(month,ExhDatedebut) as ExhMonthdebut,DATENAME(month,ExhDatefin) as ExhMonthfin,* FROM Exhibition WHERE ExhDateFin > GETDATE() order by ExhDatedebut, ExhDateFin" rsRes.Open strSql,DataConn,1,3 %> <p><strong>Forthcoming planned exhibitions <%'=year(rsRes("ExhDateDebut"))%></strong><br> <br> <table width="100%" border="0" cellpadding="3" cellspacing="0"> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="5" align="center"> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td align="center">Booth</td> <td> </td> </tr> <tr align="left"> <td colspan="5" class="tdAnchorLine">» <%= day(rsRes("ExhDateFin"))%> <%= rsRes("ExhMonthFin") %> <%= year(rsRes("ExhDateFin"))%> </td> </tr> <tr> <td align="right"> </td> <td> </td> <td> <b><%= rsRes("ExhSalon")%></b> <br> <%Response.Write rsRes("ExhLieu")%><br> <%= rsRes("ExhIntitule") </td> <td align="center" > <%Response.Write rsRes("Exhstand")%> </td> <td> <% IF rsRes("exSoldOut")=1 THEN %> <% ELSE %> <%= rsRes("id_Exhibition")%> <% END IF %> </td> </tr> <% rsRes.MoveNext loop %> </table> <% rsRes.Close Set rsRes = Nothing DataConn.Close Set DataConn = Nothing %>
Merci pour votre aide.
Partager