Adding Parameters in code, how?

Discussion in 'ASP .Net' started by Jeff, Oct 28, 2008.

  1. Jeff

    Jeff Guest

    hi

    asp.net 2.0

    I have a ObjectDataSource which I in my code wants to create the
    SelectParameters for.
    (reason as this GridView is used on multiple pages and hence sometime
    parameters will differ)

    ObjectDataSource ods = (ObjectDataSource)LoginView1.FindControl("odsCars");
    ods.SelectParameters.Add(new Parameter());

    Problem, i don't know what arguments to send into the Paramer() constructor.
    I want to define parameter name, default value (or value) and datatype

    any suggestions?
     
    Jeff, Oct 28, 2008
    #1
    1. Advertisements

  2. Jeff

    Jeff Guest

    solved

    "Jeff" <> wrote in message
    news:Olq$...
    > hi
    >
    > asp.net 2.0
    >
    > I have a ObjectDataSource which I in my code wants to create the
    > SelectParameters for.
    > (reason as this GridView is used on multiple pages and hence sometime
    > parameters will differ)
    >
    > ObjectDataSource ods =
    > (ObjectDataSource)LoginView1.FindControl("odsCars");
    > ods.SelectParameters.Add(new Parameter());
    >
    > Problem, i don't know what arguments to send into the Paramer()
    > constructor. I want to define parameter name, default value (or value) and
    > datatype
    >
    > any suggestions?
    >
    >
    >
    >
     
    Jeff, Oct 28, 2008
    #2
    1. Advertisements

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?UmVuaml0aCBDaGVtYmFrYXJheWls?=

    mass adding parameters t sql procedures

    =?Utf-8?B?UmVuaml0aCBDaGVtYmFrYXJheWls?=, Dec 20, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    540
    Jason
    Dec 21, 2004
  2. tshad

    adding parameters

    tshad, May 31, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    522
    tshad
    Jun 17, 2005
  3. Jonck van der Kogel
    Replies:
    2
    Views:
    1,210
    Jonck van der Kogel
    May 27, 2004
  4. Replies:
    2
    Views:
    7,419
  5. Jason
    Replies:
    2
    Views:
    809
    Jonathan Mcdougall
    May 13, 2006
  6. kito
    Replies:
    2
    Views:
    601
  7. Florian Loitsch
    Replies:
    11
    Views:
    475
    Michael Winter
    Mar 15, 2005
  8. Mclaren Fan
    Replies:
    2
    Views:
    879
    Richard Cornford
    Nov 8, 2011
Loading...