TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
siri
NA
45
28.3k
Data Repeater in ASP.NET
Jan 22 2012 9:54 AM
I did sample example using data repeater in ASP dot net using vb code ...
as iam not getting data frm my table plz can anyone tell y iam not getting data frm table as it showing only table header.....
as my vb code....
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If cn.State = ConnectionState.Closed Then cn.Open()
sqlquery = "select * from Main_tbl "
cmd = New SqlCommand(sqlquery, cn)
adap = New SqlDataAdapter(cmd)
adap.Fill(dt)
If dt.Rows.Count Then
Repeater1.DataSource = dt
Repeater1.DataBind()
End If
End Sub
****************
<body>
<form id="form1" runat="server">
<asp:Repeater ID="Repeater1" runat="server" >
<HeaderTemplate>
<table>
<tr>
<th>
<asp:Label ID="lblsn" Text="School Number" runat="server"></asp:Label>
</th>
<th>
<asp:Label ID="lblan" Text="Account Number" runat="server"></asp:Label>
</th>
<th>
<asp:Label ID="lblln" runat="server" Text="Last Name"></asp:Label>
</th>
<th>
<asp:Label ID="lblzipcode" runat="server" Text="Zip Code"></asp:Label>
</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
</form>
</body>
</html>
Reply
Answers (
3
)
Web.Config file
could u tell where i can get c#.net code for practice.