cascade change other control based on dropdownlist control changes

Discussion in 'ASP .Net' started by =?Utf-8?B?d2lsbGlhbQ==?=, Jan 27, 2005.

  1. Hi,

    I have a dropdownlist control and a few textbox on my web form. How can I
    update those textbox content when user select item from dropdownlist control?
    I really want to do this on client side so that don't need back to server.
    Thanks.

    william
     
    =?Utf-8?B?d2lsbGlhbQ==?=, Jan 27, 2005
    #1
    1. Advertising

  2. Hi William
    in the property of dropDownList make AutoPostBack=true
    and in the events of dropDownList.selectIndexChange write ur code


    "william" wrote:

    > Hi,
    >
    > I have a dropdownlist control and a few textbox on my web form. How can I
    > update those textbox content when user select item from dropdownlist control?
    > I really want to do this on client side so that don't need back to server.
    > Thanks.
    >
    > william
    >
     
    =?Utf-8?B?c2FyYQ==?=, Jan 27, 2005
    #2
    1. Advertising

  3. William,

    Basically, you just need to operate on DHTML objects corresponding to your
    page elements. A ddl renders as an html <select> element and a textbox
    renders as <input type="text">. You need to setup a client site javascript
    onchange event handler for the dll that will get the selected text or value
    and populate the textboxes.

    Use Attributes["onchange"] = "onDllChange()" to setup the event.

    Eliyahu

    "william" <> wrote in message
    news:...
    > Hi,
    >
    > I have a dropdownlist control and a few textbox on my web form. How can I
    > update those textbox content when user select item from dropdownlist

    control?
    > I really want to do this on client side so that don't need back to server.
    > Thanks.
    >
    > william
    >
     
    Eliyahu Goldin, Jan 27, 2005
    #3
  4. Re: cascade change other control based on dropdownlist control cha

    Hi Eliyahu,
    Thanks.
    william

    "Eliyahu Goldin" wrote:

    > William,
    >
    > Basically, you just need to operate on DHTML objects corresponding to your
    > page elements. A ddl renders as an html <select> element and a textbox
    > renders as <input type="text">. You need to setup a client site javascript
    > onchange event handler for the dll that will get the selected text or value
    > and populate the textboxes.
    >
    > Use Attributes["onchange"] = "onDllChange()" to setup the event.
    >
    > Eliyahu
    >
    > "william" <> wrote in message
    > news:...
    > > Hi,
    > >
    > > I have a dropdownlist control and a few textbox on my web form. How can I
    > > update those textbox content when user select item from dropdownlist

    > control?
    > > I really want to do this on client side so that don't need back to server.
    > > Thanks.
    > >
    > > william
    > >

    >
    >
    >
     
    =?Utf-8?B?d2lsbGlhbQ==?=, Jan 28, 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. Luis Esteban Valencia

    How to change row data when dropdownlist changes?

    Luis Esteban Valencia, Mar 23, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    564
    Luis Esteban Valencia
    Mar 23, 2005
  2. darrel

    do try/catches cascade?

    darrel, Aug 9, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    414
    darrel
    Aug 10, 2005
  3. Arnold Peters
    Replies:
    1
    Views:
    338
    Sudsy
    Oct 6, 2004
  4. Larry Yondespor

    Hibernate on delete cascade

    Larry Yondespor, Mar 20, 2005, in forum: Java
    Replies:
    2
    Views:
    46,073
    Larry Yondespor
    Mar 20, 2005
  5. john woo
    Replies:
    3
    Views:
    169
    Mick White
    Jul 1, 2005
Loading...

Share This Page