/ Published in: C#
Old school or simple way of querying data without a DAL.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
SqlDataAdapter adapter = new SqlDataAdapter("SELECT * FROM Product", ConfigurationManager.ConnectionStrings["ConnectionStringValue"].ConnectionString); adapter.Fill(table); Repeater1.DataSource = table; Repeater1.DataBind(); //Access data in .aspx with <%#Eval("fieldName")%>