DropDownList problem

Discussion in 'ASP .Net' started by Chumley Walrus, Jun 20, 2005.

  1. I'm trying to build a querystring from a button click carrying over two
    variables (one from a textbox, the other from a dropdownlist),but for
    some reason, the error I'm getting
    is:'System.Web.UI.WebControls.DropDownList' does not contain a
    definition for 'selecteditem'
    The query string works with just the txtmydate carrying over, but not
    the salesoffice value

    private void btnSubmit_Click(object sender, System.EventArgs e)
    {
    Response.Redirect("display.aspx?txtmydate=" +
    this.txtmydate.Text + "&salesoffice=" +
    this.salesoffice.selecteditem.value);
    }

    ????
    chumley walrus
    Chumley Walrus, Jun 20, 2005
    #1
    1. Advertising

  2. I think it's just a Case Sensitivity thing if that's the actual code..

    this.salesoffice.SelectedItem should work

    --
    W.G. Ryan, MVP

    www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
    "Chumley Walrus" <> wrote in message
    news:...
    > I'm trying to build a querystring from a button click carrying over two
    > variables (one from a textbox, the other from a dropdownlist),but for
    > some reason, the error I'm getting
    > is:'System.Web.UI.WebControls.DropDownList' does not contain a
    > definition for 'selecteditem'
    > The query string works with just the txtmydate carrying over, but not
    > the salesoffice value
    >
    > private void btnSubmit_Click(object sender, System.EventArgs e)
    > {
    > Response.Redirect("display.aspx?txtmydate=" +
    > this.txtmydate.Text + "&salesoffice=" +
    > this.salesoffice.selecteditem.value);
    > }
    >
    > ????
    > chumley walrus
    >
    W.G. Ryan eMVP, Jun 20, 2005
    #2
    1. Advertising

  3. Thanks...

    these damn C family programs #@!$#$%!@!!
    Chumley Walrus, Jun 21, 2005
    #3
  4. Chumley Walrus

    Mike Labosh Guest

    > these damn C family programs #@!$#$%!@!!

    Algol family.

    C, C++, C# & Java all came from Algol. And if you haven't seen Algol yet,
    be glad you haven't. :)

    --
    Peace & happy computing,

    Mike Labosh, MCSD

    "Mr. McKittrick, after very careful consideration, I have
    come to the conclusion that this new system SUCKS."
    -- General Barringer, "War Games"
    Mike Labosh, Jun 21, 2005
    #4
    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. mr2_93
    Replies:
    1
    Views:
    3,597
    mr2_93
    Oct 2, 2005
  2. tshad
    Replies:
    8
    Views:
    2,228
    tshad
    Oct 19, 2005
  3. =?Utf-8?B?SnVhbmpv?=

    GridView: Filtr DropDownList from another DropDownList

    =?Utf-8?B?SnVhbmpv?=, Dec 23, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    1,863
    =?Utf-8?B?SnVhbmpv?=
    Dec 23, 2005
  4. =?Utf-8?B?SnVhbmpv?=

    GridView: Filter DropDownList for another DropDownList

    =?Utf-8?B?SnVhbmpv?=, Dec 29, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    1,296
    =?Utf-8?B?SnVhbmpv?=
    Dec 29, 2005
  5. keithb
    Replies:
    1
    Views:
    11,970
    shauns1
    Nov 1, 2006
Loading...

Share This Page