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. Advertising

  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. 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. news.microsoft.com
    Replies:
    0
    Views:
    381
    news.microsoft.com
    May 3, 2004
  2. Jonck van der Kogel
    Replies:
    2
    Views:
    987
    Jonck van der Kogel
    May 27, 2004
  3. Jason
    Replies:
    2
    Views:
    515
    Jonathan Mcdougall
    May 13, 2006
  4. kito
    Replies:
    2
    Views:
    417
  5. Florian Loitsch
    Replies:
    11
    Views:
    253
    Michael Winter
    Mar 15, 2005
Loading...

Share This Page