Re: How to share data between two controls????????????????????????????????????????????????????????

Discussion in 'ASP .Net' started by Eran Amitai, Jan 11, 2004.

  1. Eran Amitai

    Eran Amitai Guest

    All you need to do is handle the SelectedIndexChanged event of the
    SearchFacility dropdown and in the handler set the edit box value.
    EditBox.Text = DropList.SelectedValue.


    <> wrote in message news:btkjui$8bkbo$...
    > Hi!
    >
    >
    >
    > I have a big big problem!!!
    >
    > :(
    >
    >
    >
    > what I will do:
    >
    >
    >
    > on my web form: UpdateFacility.aspx
    >
    >
    >
    > are two controls: SearchFacility.ascx and AddEditFacility.ascx
    >
    >
    >
    > SearchFacility has a dropdown list. when the user choose an item from the
    > dropdown list the SearchFacility should transfer the selected item value

    to
    > a text box on the second control (AddEditFacility).
    >
    >
    >
    > I try it so:
    >
    >
    >
    > I set:
    >
    > ViewState.Add("currentFacilityOID", _ddlFacilities.SelectedItem.Value);
    >
    >
    >
    > On the InitializeComponent() in AddEditFacility is
    > ViewState["currentFacilityOID"] ever null.
    >
    > It seems that on this web form are 3 different ViewStates:
    >
    >
    >
    > 1. ViewState on the UpdateFacility.aspx
    >
    > 2. ViewState on the SearchFacility.ascx
    >
    > 3. ViewState on the AddEditFacility.ascx´
    >
    >
    >
    > But why?
    >
    >
    >
    > One possibility that I see is to make this:
    >
    > Application.Add("currentFacilityOID", _ddlFacilities.SelectedItem.Value);
    >
    > But I don't want to use the Application object.
    >
    >
    >
    >
    >
    > Exists any possibility to share data between two controls on the same web
    > form????
    >
    >
    >
    >
    >
    >
    >
    > Best Regards,
    >
    >
    >
    >
    >
    > gicio
    >
    >
     
    Eran Amitai, Jan 11, 2004
    #1
    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. CharlieHoo
    Replies:
    3
    Views:
    10,280
    Steven Cheng[MSFT]
    Jun 24, 2005
  2. Guest

    How to share data between two controls

    Guest, Jan 8, 2004, in forum: ASP .Net Building Controls
    Replies:
    2
    Views:
    155
    Eran Amitai
    Jan 11, 2004
  3. Guest

    How to share data between two controls

    Guest, Jan 8, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    133
    Eran Amitai
    Jan 11, 2004
  4. Saraswati lakki
    Replies:
    0
    Views:
    1,389
    Saraswati lakki
    Jan 6, 2012
  5. Laura Schmidt

    share data between two tomcat contexts?

    Laura Schmidt, May 17, 2014, in forum: Java
    Replies:
    9
    Views:
    207
    Brixomatic
    May 22, 2014
Loading...

Share This Page