Gridview and Empty Textbox .net 2.0

  • Thread starter Thread starter paulmac106
  • Start date Start date
P

paulmac106

Hi,

I have a gridview based on a SQL stored procedure. I then want to let
the user filter the results by 4 textboxes. When all 4 textboxes have
"some" search criteria the gridview works fine, but if even one is left
blank the gridview doesn't return any records. When I test the stored
procedure itself it works fine. Can you help me work with the empty
textboxes.

thanks,
Paul
 
Hi,
I have a gridview based on a SQL stored procedure. I then want to let
the user filter the results by 4 textboxes. When all 4 textboxes have
"some" search criteria the gridview works fine, but if even one is left
blank the gridview doesn't return any records. When I test the stored
procedure itself it works fine. Can you help me work with the empty
textboxes.

thanks,
Paul

What will the query be when you have empty textboxes?
How did you test the stored procedure?

An empty textbox will have an "empty string" as value, not "null",
maybe that's the problem.

Can you use SqlProfiler to check what is executed in SqlServer?

Hans Kesting
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top