473,396 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

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
Nov 18 '05 #1
1 1202
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.
<gi***@gmx.de> wrote in message news:bt************@news.hansenet.net...
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

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Newbee Adam | last post by:
anyone have any secrets or pearls about vb.net you want to share I was asked by my company to begin teach an introductory VB.Net course 2 day seminar. I had been teaching an sql server 2000...
0
by: inetmug | last post by:
Hello: I am using ASP.NET as our front end. I also have to interface to some legacy systems that use a callback mechanism. The legacy systems use callbacks (via CORBA) to communicate back to...
68
by: rkusenet | last post by:
http://www.eweek.com/article2/0,1759,1820667,00.asp The database market grew by 10.3 percent in 2004, fueled largely by hunger for business intelligence and analytics, according to numbers...
5
by: jqpdev | last post by:
Hello all... I'm coming from a Borland Delphi background. Delphi has a specific component called a Data Module. In the designer the Data Module behaves like a windows form. A developer can...
3
by: Chad A. Beckner | last post by:
Hey everyone, Ok. I have a "template and skin" setup on the beginnings of a new portal site. In this site, there are going to be many applications, which will be store underneath the "master"...
4
by: dx | last post by:
I have 3 vb.net web applications. I would like all 3 to have access to a library of user controls. server controls wouldn't cause a problem but these are user controls (ascx.) From each solution...
5
by: Raed Sawalha | last post by:
We have a web application with at least 570 Pages and 10's of user controls ....all under project name LinkDevProject ...recently we start separating the project into multiple projects ....the...
9
by: moondaddy | last post by:
I'm using asp.net 2.0 and c# and would like to share some user control between several websites. these websites are on the same server and have a physical location right next to each other like...
10
by: =?Utf-8?B?SmFrb2IgTGl0aG5lcg==?= | last post by:
We have a complex VS solution with several web projects. The reason is the applications share a lot of business logic that change often and we want to observe the implications of all changes. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.