Search the Community
Showing results for tags 'Repeater'.
Hi there, I'm new on ASP.NET and have the following problem: I get some data from a MS SQL-Server using a stored procedure. To display the data I'm using <ul>, <li> in a Repeater, because I have to do some optical customization. Now I want to call a sub from the Code Behind file, by clicking on a List Item. Right now the ClickEvent should just cause a Console output, that the Item was clicked.But I'm getting an error, saying the sub is undefined. Here is the code: <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1"> <ItemTemplate> <li runat="server" onclick="selectItem" data-icon="false"><a href="index.aspx"><%#Eval("Employee")%></a></li> </ItemTemplate> </asp:Repeater> Public Sub selectItem(ByVal sender As Object, ByVal e As System.EventArgs) Console.WriteLine("Clicked") End Sub Thanks for your help