473,322 Members | 1,781 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Gridview and Empty Textbox .net 2.0

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

Jan 9 '06 #1
1 2199
> 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
Jan 9 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jon S via DotNetMonster.com | last post by:
HI all, I'm returning a dataset to a gridview control. When the gridview asp.net control is populated from the returning dataset some of the cells remain empty. This is expected as some data...
1
by: Giovanni | last post by:
Dear Friends/Gurus, I have exhausted myself and have yet no solution to the following: I have an ASP.NET 2.0 Survey type application. On a page, I have placed a GridView which is bound to an...
3
by: Gabriel | last post by:
Hello, Is there a way to add a Textbox to a GridView ? I'd like one TextBox by record. Thanks,
13
by: AG | last post by:
I have a gridview that I bind to a List(of Type) at runtime. Not using a datasource control. The gridview has a template column with an imagebutton whose commandname is set to 'Delete'. The...
2
by: Dale | last post by:
This seems like it should be simple and I am pretty sure I've done similar things a hundred times before but I sure can't seem to get it right this time. I have a GridView with a column of text...
1
by: =?Utf-8?B?Q2hyaXM=?= | last post by:
Hi, I have a gridview which I added a <asp:CommandField EditText="E" CancelText="C" UpdateText="U" ButtonType="Link" ShowEditButton="True" /> my gridview looks like this <asp:GridView...
4
by: tim.cavins | last post by:
I have a GridView populated by an ObjectDataSource. I am having issues passing the parameters to the objectdatasource. I have verified that the method is being called but none of the parameters...
4
by: anniebai | last post by:
Please help me with writing a RowUpdating function in C#, I don't know how to grab the current field's value and also get the old value for one of keys (which is ProjectName for editing) of the...
6
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi I have a gridview control with a template column that has a textbox and when the control is bound to the datasource the textbox is filled ok. I then change what is in the textbox in the gridview...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.