FormView DropdownList - On Selection Change populate Text Box

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?U2F0aXNo?=

    FormView DropdownList - On Selection Change populate Text Box

    C#, ASP.NET
    Q: Have a formview, with a dropdownlist which is bound to a column. This
    dropdownlist has a datasource of DataSet type. Now my objective is, on
    Selection Changed of this DropdownList, I need to populate a couple of
    TextBox's. How can I do this? What event does the code go into? The
    selectionindexc hanged even for the DropDownList does not seem to fire.

    Any help is appreciated.

    Thanks in advance.

  • Just Me

    #2
    Re: FormView DropdownList - On Selection Change populate Text Box

    The selectIndexChan ged event absolutely should fire. However, if you are
    expecting it to cause a postback when you change the selection, you need to
    set the AutoPostback property= true in the properties for this control.

    Once you have got the event fireing its jsut a matter of writing your code
    based on the selected index data.

    HTH




    "Satish" <Satish@discuss ions.microsoft. comwrote in message
    news:1E9BB37C-353F-4EC9-B51D-BE3C978D0F2A@mi crosoft.com...
    C#, ASP.NET
    Q: Have a formview, with a dropdownlist which is bound to a column. This
    dropdownlist has a datasource of DataSet type. Now my objective is, on
    Selection Changed of this DropdownList, I need to populate a couple of
    TextBox's. How can I do this? What event does the code go into? The
    selectionindexc hanged even for the DropDownList does not seem to fire.
    >
    Any help is appreciated.
    >
    Thanks in advance.
    >

    Comment

    • =?Utf-8?B?U2F0aXNo?=

      #3
      RE: FormView DropdownList - On Selection Change populate Text Box

      Nope, tried adding code in SelectionIndexC hanged Event and even tried with
      the Debugger, nothing.

      "Satish" wrote:
      C#, ASP.NET
      Q: Have a formview, with a dropdownlist which is bound to a column. This
      dropdownlist has a datasource of DataSet type. Now my objective is, on
      Selection Changed of this DropdownList, I need to populate a couple of
      TextBox's. How can I do this? What event does the code go into? The
      selectionindexc hanged even for the DropDownList does not seem to fire.
      >
      Any help is appreciated.
      >
      Thanks in advance.
      >

      Comment

      • Just Me

        #4
        Re: FormView DropdownList - On Selection Change populate Text Box


        Does your page_load event fire ?, if not, check that your Autowireup event
        is set to true. Also, you didnt comment on the Autopostback I mentioned have
        you checked this.

        Whatever you problem is, its likely to be very basic.



        "Satish" <Satish@discuss ions.microsoft. comwrote in message
        news:66AC15AB-EB27-4FC8-8449-30205257CEB3@mi crosoft.com...
        Nope, tried adding code in SelectionIndexC hanged Event and even tried with
        the Debugger, nothing.
        >
        "Satish" wrote:
        >
        >C#, ASP.NET
        >Q: Have a formview, with a dropdownlist which is bound to a column. This
        >dropdownlist has a datasource of DataSet type. Now my objective is, on
        >Selection Changed of this DropdownList, I need to populate a couple of
        >TextBox's. How can I do this? What event does the code go into? The
        >selectionindex changed even for the DropDownList does not seem to fire.
        >>
        >Any help is appreciated.
        >>
        >Thanks in advance.
        >>

        Comment

        • Just Me

          #5
          Re: FormView DropdownList - On Selection Change populate Text Box

          Should read "Autowireup " @page property


          "Just Me" <news.microsoft .comwrote in message
          news:OisiOlRkIH A.484@TK2MSFTNG P04.phx.gbl...
          >
          Does your page_load event fire ?, if not, check that your Autowireup event
          is set to true. Also, you didnt comment on the Autopostback I mentioned
          have you checked this.
          >
          Whatever you problem is, its likely to be very basic.
          >
          >
          >
          "Satish" <Satish@discuss ions.microsoft. comwrote in message
          news:66AC15AB-EB27-4FC8-8449-30205257CEB3@mi crosoft.com...
          >Nope, tried adding code in SelectionIndexC hanged Event and even tried
          >with
          >the Debugger, nothing.
          >>
          >"Satish" wrote:
          >>
          >>C#, ASP.NET
          >>Q: Have a formview, with a dropdownlist which is bound to a column. This
          >>dropdownlis t has a datasource of DataSet type. Now my objective is, on
          >>Selection Changed of this DropdownList, I need to populate a couple of
          >>TextBox's. How can I do this? What event does the code go into? The
          >>selectioninde xchanged even for the DropDownList does not seem to fire.
          >>>
          >>Any help is appreciated.
          >>>
          >>Thanks in advance.
          >>>
          >
          >

          Comment

          • =?Utf-8?B?U2F0aXNo?=

            #6
            Re: FormView DropdownList - On Selection Change populate Text Box

            Page load fires, regardless of Postback - true/false.

            However, the selectionindexc hanged event just does not fire.
            I read thru the AutoEventWireup attribute and made sure that it is set to
            true everywhere, webconfig as well as the aspx page itself.

            I am also using VS2008.

            "Just Me" wrote:
            Should read "Autowireup " @page property
            >
            >
            "Just Me" <news.microsoft .comwrote in message
            news:OisiOlRkIH A.484@TK2MSFTNG P04.phx.gbl...

            Does your page_load event fire ?, if not, check that your Autowireup event
            is set to true. Also, you didnt comment on the Autopostback I mentioned
            have you checked this.

            Whatever you problem is, its likely to be very basic.



            "Satish" <Satish@discuss ions.microsoft. comwrote in message
            news:66AC15AB-EB27-4FC8-8449-30205257CEB3@mi crosoft.com...
            Nope, tried adding code in SelectionIndexC hanged Event and even tried
            with
            the Debugger, nothing.
            >
            "Satish" wrote:
            >
            >C#, ASP.NET
            >Q: Have a formview, with a dropdownlist which is bound to a column. This
            >dropdownlist has a datasource of DataSet type. Now my objective is, on
            >Selection Changed of this DropdownList, I need to populate a couple of
            >TextBox's. How can I do this? What event does the code go into? The
            >selectionindex changed even for the DropDownList does not seem to fire.
            >>
            >Any help is appreciated.
            >>
            >Thanks in advance.
            >>
            >
            >
            >

            Comment

            Working...