I have this:
[code]
If ds.Tables.Count > 0 AndAlso ds.Tables(0).Rows.Count > 0 Then
lblMessage.Text = "Er zijn geen resultaten gevonden."
lblMessage.Text = "Er zijn geen resultaten gevonden."
lblMessage.Text = String.Empty
Dim fc As Byte() = csv.Export(ds.Tables(0))
Response.Clear()
Response.ContentType = "text/csv"
Response.AddHeader("Content-Disposition", "attachment;filename=facturatie.csv")
Response.OutputStream.Write(fc, 0, fc.Length)
Response.End()
Else
lblMessage.Text = "Er zijn geen resultaten gevonden."
End If
[/code]I dont want to show the lbMessage when there is found results. But because of the Response.Clear() method clears the HTML. SO that doesnt work. So how to manage that you will not see the lbMessage() when results found
Thank you
albert albertPosted Dec 6, 2013, 3:12 AM
[code]
[/code]
Jignesh TrivediPosted Dec 6, 2013, 12:55 AM
your code itself remove the content of lblMessage label ...
I think try after remove lblMessage.Text = String.Empty sentence.
hope this will help you.