Il fauts applique les ettapes suivant 1ereEtape :(Niveau de sql server)Creation un Table pour stcker votre images par Id Par exemple:Id_img | Chemin | Titre____________________________1 |c:\imag\0001.jpg |image 012 |c:\imag\0002.gif |image 02.. | ...................... |..............Attenttion l'extention (jpg,gif,.............)2emeEtape :(Niveau de Asp.net)Fichier (photo.aspx.vb)---------------------------------------------------------------------------------Imports System.DataImports System.Data.SqlClientPartial Class _amajalah
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim DS As DataSet Dim MyConnection As SqlConnection Dim MyCommand As SqlDataAdapter MyConnection = New SqlConnection("La chaine de la connexion ") MyCommand = New SqlDataAdapter("votre reqeute", MyConnection) DS = New DataSet() MyCommand.Fill(DS, "table") MyDataList.DataSource = DS.Tables("table").DefaultView MyDataList.DataBind()
End SubEnd Class ----------------------------------------------------------------------------------Fichier (photo.aspx)On utilulons soit datalist ou bien repeater ---------------------------------------------------------------------------------- <ASP:DataList id="MyDataList" RepeatColumns="3" runat="server" Width="500px" RepeatDirection="Horizontal">
<ItemTemplate>
<table cellpadding=10 style="font: 10pt verdana" class="Resumes10" WIDTH=100% > <tr> <td valign="top"> <img align="top" src='<%# DataBinder.Eval(Container.DataItem, "Chemin " ) %>' > </td> </tr> <tr> <td valign="top"> <a href='<%# DataBinder.Eval(Container.DataItem, "Id_img", "amajalah{0}.aspx?) %>'> <%# DataBinder.Eval(Container.DataItem, "Titre") %> </a> </td> </tr> </table>
</ItemTemplate>
</ASP:DataList>
Se souvenir du profil
Mot de passe oublié ? / Activation de compteCréer un compte
1 903 479 membres 55 nouveaux aujourd'hui 16 195 membres club