473,406 Members | 2,371 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,406 software developers and data experts.

sending value between user controls

Hey
asp.net 2.0

I wonder what C# code I need to send a value from one user control to
another user control on the same webpage? Maybe some of you have a link to a
great example covering this topic?

Jeff
Sep 5 '06 #1
2 1155
Your question isn't clear - are you looking to pass values between controls
once they have been rendered in the browser, or is it something server side.
You'll need to be more specific if your expecting a good answer.

For client side, you need to use javascript
http://ise.gmu.edu/~ofut/classes/432...efield-js.html

and t6o use it in asp.net look up registerclietnscriptblock and its
companion methods
http://www.codeproject.com/aspnet/scriptregister.asp

Regards

John Timney (MVP)
"Jeff" <it_consultant1@NO_SPAM.hotmail.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
Hey
asp.net 2.0

I wonder what C# code I need to send a value from one user control to
another user control on the same webpage? Maybe some of you have a link to
a great example covering this topic?

Jeff

Sep 5 '06 #2
Hi,

Jeff wrote:
Hey
asp.net 2.0

I wonder what C# code I need to send a value from one user control to
another user control on the same webpage? Maybe some of you have a link to a
great example covering this topic?

Jeff
On the server, a user control is just a class. If you want to have an
instance of a class calling an instance of another class, you must
locate a reference to this instance (for example using the Page, or a
static method of the class itself), and then you can call methods of
this instance, depending on their visibility of course.

Is that what you're looking for?

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Sep 5 '06 #3

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

Similar topics

2
by: lehmann | last post by:
Hello, Is it possible to have a disabled input in a form whose value could be sent when the form is submitted. I just need the user not to be able to change the input value, but this value is...
1
by: Steve Gadlin | last post by:
Hi there! First off, let me apologize for the basic question... I'm very new to .NET programming. I'm building a web site using VB.NET, and am trying to include several custom user controls. ...
13
by: joe215 | last post by:
I want my users to send emails from a Windows app that I am developing in Visual Basic.NET 2003. I found a good example of sending email to a SMTP server using the SmtpMail class. However, using...
3
by: James | last post by:
Hi, I have a combo box(cmboParts) and the row source is a part name. Once a part is selected I have button(cmdOrderAdd) to add data about this part to a sub-form(frmParts_Ordered). However this...
2
by: Wee Bubba | last post by:
my page is split into 2 frames. my upper frame contains a data entry form consisting of asp.net textbox server controls. my lower frame displays rows of data. when a user clicks the submit...
5
by: Vishal | last post by:
Hello, I already asked this question in the ASP.NET forums, but no help came. So I am hoping that somebody can help me out. This is really very URGENT me. For my e-commerce application, I...
3
by: Jeff | last post by:
Hey ASP.NET 2.0 This the ObjectDataSource in my UserControl, <asp:ObjectDataSource ID="odsMessage" runat="server" SelectMethod="ExecuteMessage" TypeName="AH.MyNetwork.BLL.Network.Message">...
6
by: =?Utf-8?B?U2hhcm9u?= | last post by:
I'm using the VScrollBar and set it as follow: m_vScrollBar.Minimum = -19602; m_vScrollBar.Maximum = 0; m_vScrollBar.SmallChange = 1; m_vScrollBar.LargeChange = 1089; m_vScrollBar.Value =...
17
geolemon
by: geolemon | last post by:
This should be an easy one for anyone with basic forms experience (I'd hate for you guys to be bored!) :D I have a simple form, bound to a single table. I'd *like* the form to work this way:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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.