Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. SqlDataAdapter adp = new SqlDataAdapter("select * from tbitem", ConfigurationManager.ConnectionStrings["cn"].ConnectionString);
  2. DataSet ds = new DataSet();
  3. adp.Fill(ds);
  4. DataList1.DataSource = ds;
  5. DataList1.DataBind();
  6.  
  7. <asp:DataList ID="DataList1" runat="server">
  8. <ItemTemplate>
  9. <b>Name: </b> <%#Eval("itemnam") %><br />
  10. <b>Description: </b>
  11. <asp:Label ID="Label1" runat="server" Text='<%#Eval("itemdescription") %>'></asp:Label> <br /><br />
  12. </ItemTemplate>
  13. </asp:DataList>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement