Advertisement

06.16.2008 at 09:34AM PDT, ID: 23488777
[x]
Attachment Details

How can find out if a datalist control has return no results?

Asked by mmedi005 in .NET Framework 2.0, Programming for ASP.NET

I have a datalist control that when some text box fields are filled out, a certain sql statement is executed and a query is populated.  

The results appear when the person hits a search that can populate results.  If there are no results to return i get no action.  I want to be able to check if the datalist rendered results or not.   Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
Protected Sub Search()
 
        Me.uxSearchDataList.DataSourceID = Me.uxSearchSqlDataSource.ID
 
        Dim sql as string = ""
 
        ..............
 
        Me.uxSearchSqlDataSource.SelectCommand = sql
 
    End Sub
 
    Protected Sub uxSearchButton_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs)
 
        Search()
 
    End Sub
 
 
[+][-]06.16.2008 at 11:49AM PDT, ID: 21796290

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .NET Framework 2.0, Programming for ASP.NET
Sign Up Now!
Solution Provided By: samtran0331
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628