M
Mike
I have a SqlDataSource that returns a list of companies and their details by
ProductID from a stored procedure. It also returns the name of the product
associated with the ProductID as the final column (which means it appears
for every record returned). I already have a way of determining how many
rows were returned, and use that information in a label to say "Your search
has returned x records" at the top of the page, above the gridview that
displays the company records:
protected void dsGetSuppliersByProduct_Selected(object sender,
SqlDataSourceStatusEventArgs e)
{
int RecordCount = e.AffectedRows;
if (RecordCount == 0)
{ lblRecordCount.Text = "<p>No Records found</p>"; }
else
{
if (RecordCount == 1)
{ lblRecordCount.Text = "<p>Your search returned 1
record</p>"; }
else
{ lblRecordCount.Text = "<p>Your search returned " + RecordCount
+ " records</p>"; }
}
}
How can I access the ProductName value so that I can extend the label text
to say "Your search has returned x records for <ProductName>" ?
Thanks
Mike
ProductID from a stored procedure. It also returns the name of the product
associated with the ProductID as the final column (which means it appears
for every record returned). I already have a way of determining how many
rows were returned, and use that information in a label to say "Your search
has returned x records" at the top of the page, above the gridview that
displays the company records:
protected void dsGetSuppliersByProduct_Selected(object sender,
SqlDataSourceStatusEventArgs e)
{
int RecordCount = e.AffectedRows;
if (RecordCount == 0)
{ lblRecordCount.Text = "<p>No Records found</p>"; }
else
{
if (RecordCount == 1)
{ lblRecordCount.Text = "<p>Your search returned 1
record</p>"; }
else
{ lblRecordCount.Text = "<p>Your search returned " + RecordCount
+ " records</p>"; }
}
}
How can I access the ProductName value so that I can extend the label text
to say "Your search has returned x records for <ProductName>" ?
Thanks
Mike