SQLdataSource with 2 parameters

Discussion in 'ASP .Net' started by drewdr@yahoo.com, Dec 22, 2005.

  1. Guest

    I've got a LastName textbox and a FirstName textbox.

    How do I make LastName mandatory, and FirstName optional ?

    If I use Select..........Where (LastName=?) AND (FirstName=?)
    i need input from both textboxes, and if I use OR- it is either.
    , Dec 22, 2005
    #1
    1. Advertising

  2. May be you can use something like
    Select..........Where (LastName=?) AND (FirstName=?+%)

    So if the first name is blank the query will get all the Firstnames

    "" wrote:

    > I've got a LastName textbox and a FirstName textbox.
    >
    > How do I make LastName mandatory, and FirstName optional ?
    >
    > If I use Select..........Where (LastName=?) AND (FirstName=?)
    > i need input from both textboxes, and if I use OR- it is either.
    >
    >
    >
    =?Utf-8?B?Sml0ZXNo?=, Dec 22, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?TWFydGluIEJpc2Nob2Zm?=

    Modify SqlDataSource parameters before select

    =?Utf-8?B?TWFydGluIEJpc2Nob2Zm?=, Oct 20, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    27,933
    Steven Cheng[MSFT]
    Oct 25, 2005
  2. Kees de Winter

    How to access parameters of SqlDataSource

    Kees de Winter, Mar 29, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    5,530
    Kees de Winter
    Mar 29, 2006
  3. =?Utf-8?B?RGFiYmxlcg==?=

    modify SqlDataSource parameters in code behind?

    =?Utf-8?B?RGFiYmxlcg==?=, Apr 4, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    28,294
    =?Utf-8?B?RGFiYmxlcg==?=
    Apr 4, 2006
  4. =?Utf-8?B?R3JlaWY=?=

    Setting Parameters for SqlDataSource control

    =?Utf-8?B?R3JlaWY=?=, Jun 23, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    412
    =?Utf-8?B?R3JlaWY=?=
    Jun 23, 2006
  5. =?Utf-8?B?RGFuaWVsIFIuIEgu?=

    Problems with Parameters and SQLDataSource

    =?Utf-8?B?RGFuaWVsIFIuIEgu?=, Jul 19, 2006, in forum: ASP .Net
    Replies:
    6
    Views:
    9,582
    roadhawk
    Dec 31, 2009
Loading...

Share This Page