c# - ASP.NET Repeater OnItemBound -
private void bindproductsrepeater() { string cs = system.configuration.configurationmanager.connectionstrings["databaseconnectionstring"].connectionstring; using (sqlconnection con = new sqlconnection(cs)) { using (sqlcommand cmd = new sqlcommand("procbindallproducts", con)) { cmd.commandtype = commandtype.storedprocedure; using (sqldataadapter sda = new sqldataadapter(cmd)) { datatable dt = new datatable(); sda.fill(dt); rptrproducts.datasource = dt; rptrproducts.databind(); } } } }
i have method bind items repeater via onitembound, works fine. display product details, title, price, image, want create function can order items price via sql command. i'm @ wits end on how this.
Comments
Post a Comment