Set Select Control's Value from Querystring

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • j.t.w

    Set Select Control's Value from Querystring

    This is probably very easy.

    How do I set an HTML select control's value from the querystring?

    This is what I have...but, only the select control's value doesn't get
    set.
    CustomerSelect. Value = Request.QuerySt ring("cus")
    StartDate.Text = Request.QuerySt ring("Sdate")

    This works...
    StartDate.Text = Request.QuerySt ring("cus")

    Thanks,
    j.t.w
  • Cowboy \(Gregory A. Beamer\)

    #2
    Re: Set Select Control's Value from Querystring

    If you just want a dropdown, consider the server controls rather than HTML
    controls and then set selected value to the key value you wish. I can look
    at the HTML control and probably guide there, but the server controls are
    fairly straightforward .

    --
    Gregory A. Beamer
    MVP, MCP: +I, SE, SD, DBA

    *************** *************** *************** ****
    | Think outside the box!
    |
    *************** *************** *************** ****
    "j.t.w" <j.t.w@juno.com wrote in message
    news:a9a2e312-6182-45b3-83b5-5298b955a785@q7 8g2000hsh.googl egroups.com...
    This is probably very easy.
    >
    How do I set an HTML select control's value from the querystring?
    >
    This is what I have...but, only the select control's value doesn't get
    set.
    CustomerSelect. Value = Request.QuerySt ring("cus")
    StartDate.Text = Request.QuerySt ring("Sdate")
    >
    This works...
    StartDate.Text = Request.QuerySt ring("cus")
    >
    Thanks,
    j.t.w

    Comment

    • Aidy

      #3
      Re: Set Select Control's Value from Querystring

      Try setting the SelectedValue or SelectedText properties.

      "j.t.w" <j.t.w@juno.com wrote in message
      news:a9a2e312-6182-45b3-83b5-5298b955a785@q7 8g2000hsh.googl egroups.com...
      This is probably very easy.
      >
      How do I set an HTML select control's value from the querystring?
      >
      This is what I have...but, only the select control's value doesn't get
      set.
      CustomerSelect. Value = Request.QuerySt ring("cus")
      StartDate.Text = Request.QuerySt ring("Sdate")
      >
      This works...
      StartDate.Text = Request.QuerySt ring("cus")
      >
      Thanks,
      j.t.w
      >

      Comment

      Working...