Hi Doug,
Is this issue and continous one from the previous checkbox list query one?
I think you've now be able to query the data based on the checkboxlist's
selection status, and your current difficulty is how to do some
customization on the page depend on whether the returened query result is
empty or not, correct?
If this is the case, would you show me the code on how to query the result
and how to bind it to the databound control(DataGrid or Gridview) or are
you still using a SqlDataSource control?
If you are programmtically call ADO.NET SqlCommand or TableAdapdter to get
the DataSet, I think you can set the CheckBoxList.Visible to false in your
code after check whether the returned DataTable is empty.
If you're using SqlDataSource control, I think you may register its
"Selected" event, and use the "AffectedRows" parameter propertyto determine
whether there is any row get returned. e.g.
===============
protected void SqlDataSource1_Selected(object sender,
SqlDataSourceStatusEventArgs e)
{
Response.Write("<br/>AffectedRows: " + e.AffectedRows);
}
=================
If there is anything I have omited or if you have any parituclar
requirement, please feel free to post here.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------