Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: How to share data between two controls?????????????????????????????????????????? ??????????????

Reply
Thread Tools

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

 
 
Eran Amitai
Guest
Posts: n/a
 
      01-11-2004
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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Share-Point-2010 ,Share-Point -2010 Training , Share-point-2010Hyderabad , Share-point-2010 Institute Saraswati lakki ASP .Net 0 01-06-2012 06:39 AM
share session state between two application CharlieHoo ASP .Net 3 06-24-2005 01:44 AM
Can't share between two computers =?Utf-8?B?TmlnaHRTaGFkb3dz?= Wireless Networking 2 04-05-2005 05:36 PM
How to share data between two controls ASP .Net Building Controls 2 01-11-2004 06:59 AM
How to share data between two controls ASP .Net Web Controls 1 01-11-2004 06:59 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57