l che variabile è? siccome non è dichiarata.Originariamente inviato da pietro09
codice:<asp:Repeater ID="Repeater1" runat="server" EnableViewState="false"> <HeaderTemplate> <table> <tr> <td class="sottolineato">Comune</td> <td class="sottolineato">Prodotto</td> <td class="sottolineato">Totale</td> </tr> </HeaderTemplate> <ItemTemplate> <tr> <td><%#comune(Container.DataItem)%></td> <td><%#l.NullToStringCodificato(Eval("Prodotto"))%></td> <td><%#l.NullToStringCodificato(Eval("Totale"))%></td> </tr> </ItemTemplate> <FooterTemplate> </table> </FooterTemplate> </asp:Repeater>codice:Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load BindData() End Sub Private Sub BindData() msole.DataBind(Me.Repeater1, gl.StringaConnessioneTest, "select * from tabella19 order by comune, prodotto") End Sub Protected _comune As String = "" Protected Function comune(ByVal DataItem As Object) As String Dim dr As System.Data.Common.DbDataRecord = DirectCast(DataItem, System.Data.Common.DbDataRecord) Dim s As String = l.NullToString(dr("comune")) If s = Me._comune Then Return "" Else Me._comune = s Return s End If End Function

Rispondi quotando