Wednesday, 24 October 2018

select drop down list in asp.net by Text.

ddItems.Items.FindByText("Text").Selected = true;
ddItems.SelectedValue = ddItems.Items.FindByText("Text").Value;

Saturday, 20 October 2018

convert sqldatasource to dataview and loop on data.

        Dim paidamount As Double = 0
        Dim saleamount As Double = 0
        Dim DueAmt As Double = 0


        Dim dvSql As DataView = DirectCast(SqlDataSource1.Select(DataSourceSelectArguments.Empty), DataView)
        For Each drvSql As DataRowView In dvSql
            saleamount += CDbl(drvSql("TotalValue"))
            paidamount += CDbl(drvSql("PaidAmount"))

            DueAmt += CDbl(drvSql("Due"))
        Next