question regarding AutoPostback dropdown list

Discussion in 'ASP .Net' started by Milsnips, Feb 1, 2006.

  1. Milsnips

    Milsnips Guest

    Hi there,

    I'm using VS.NET 2003, (.NET 1.1.4322) -
    I've got dropdown list with about 10 items in it on a web page.
    On 2 of the items i'd like the autopostback to occur, whereas if the user
    selects the other items i dont want it to occur.

    Is this possible?

    thanks,
    Paul
     
    Milsnips, Feb 1, 2006
    #1
    1. Advertising

  2. Paul,

    Set AutoPostBack to false and handle the client-side onchange event. In the
    javascript event handler check what item is selected and, if a postback is
    required, make a javascript call to myForm.submit();. If you need to pass
    additional parameters to the server, for example to specify the reason for
    the postback, you can do it in hidden <input> controls.

    Eliyahu

    "Milsnips" <> wrote in message
    news:%...
    > Hi there,
    >
    > I'm using VS.NET 2003, (.NET 1.1.4322) -
    > I've got dropdown list with about 10 items in it on a web page.
    > On 2 of the items i'd like the autopostback to occur, whereas if the user
    > selects the other items i dont want it to occur.
    >
    > Is this possible?
    >
    > thanks,
    > Paul
    >
    >
    >
     
    Eliyahu Goldin, Feb 1, 2006
    #2
    1. Advertising

  3. Milsnips

    Milsnips Guest

    Great, thanks for you're help. i'll give that a try.

    regards,
    Paul
    "Eliyahu Goldin" <> wrote in message
    news:...
    > Paul,
    >
    > Set AutoPostBack to false and handle the client-side onchange event. In
    > the javascript event handler check what item is selected and, if a
    > postback is required, make a javascript call to myForm.submit();. If you
    > need to pass additional parameters to the server, for example to specify
    > the reason for the postback, you can do it in hidden <input> controls.
    >
    > Eliyahu
    >
    > "Milsnips" <> wrote in message
    > news:%...
    >> Hi there,
    >>
    >> I'm using VS.NET 2003, (.NET 1.1.4322) -
    >> I've got dropdown list with about 10 items in it on a web page.
    >> On 2 of the items i'd like the autopostback to occur, whereas if the user
    >> selects the other items i dont want it to occur.
    >>
    >> Is this possible?
    >>
    >> thanks,
    >> Paul
    >>
    >>
    >>

    >
    >
     
    Milsnips, Feb 1, 2006
    #3
    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. Lloyd Sheen
    Replies:
    3
    Views:
    4,770
  2. Mad Scientist Jr
    Replies:
    1
    Views:
    580
    Eliyahu Goldin
    Jun 29, 2004
  3. Emma Gumbdough
    Replies:
    0
    Views:
    404
    Emma Gumbdough
    Jun 29, 2004
  4. Replies:
    0
    Views:
    4,634
  5. Amol
    Replies:
    3
    Views:
    3,859
Loading...

Share This Page