what i tried
in .aspx
- <asp:Repeater ID="rtrDashboard" runat="server">
- <ItemTemplate>
- <div class="col-lg-3">
- <div class="test">
- <h4>
- <%#Eval("title")%></h4>
- <br />
- <p>
- <asp:Label ID="lblvalue" runat="server" Text='<%#Eval("query")%>'></asp:Label>
- </p>
- </div>
- </div>
- </ItemTemplate>
- </asp:Repeater>
in aspx.cs
- public void bindrepeater()
- {
- using (SqlConnection con = new SqlConnection(constr))
- {
- DataTable dt = new DataTable();
- try
- {
- con.Open();
- SqlCommand cmd = new SqlCommand("select * from DashBoard order by dash_order", con);
- DataSet ds = new DataSet();
- SqlDataAdapter da = new SqlDataAdapter(cmd);
- da.Fill(ds);
- dt = ds.Tables[0];
- rtrDashboard.DataSource = dt;
- rtrDashboard.DataBind();
- }
- catch (Exception ex)
- {
- ex.Message.ToString();
- }
- finally
- {
- con.Close();
- }
- }
- }
i don't know how to execute 3rd column query and set the value in label