473,387 Members | 1,504 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,387 software developers and data experts.

Calling User control function from another user control in vs2005,c#

Hi
I have a query related to the VS2005 usercontrol.
As i have two different usercontrol in a single master page say uc1 and uc2. Now i am calling a function of uc1 from uc2.
what is the best approach for the same.

Please also tell that i am loading the usercontrol in the masterpage at runtime and design time.So is there any change in the approach.
Jul 21 '06 #1
2 4441
Hi
I have a query related to the VS2005 usercontrol.
As i have two different usercontrol in a single master page say uc1 and uc2. Now i am calling a function of uc1 from uc2.
what is the best approach for the same.

Please also tell that i am loading the usercontrol in the masterpage at runtime and design time.So is there any change in the approach.
Hi,

Can you please explain your scene a little bit more as it is a little confusing.

Regards
Jul 21 '06 #2
Yeah
I have one master page (Index.master) that is loaded to the page(index.aspx).
This Master page contains two contentplace holder containing two different usercontrol say(UC1.ascx and uc2.ascx).
Now there is a function named "setmessage(string message)" on uc1.ascx.cs, which is used to set a lable(on uc1) text with that of message string. and there is another function name "geterror()" in the uc2.ascx.cs within which it calls the function "Setmessage()" of uc1.ascx.cs.
It's a kind of inter usercontrol communication.
Please let me know what is the best way of calling the uc2 function which ultimately calling the uc1 function.
Hope now it is clear
Jul 24 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

15
by: Bryan | last post by:
I have a multi-threaded C# console application that uses WMI (System.Management namespace) to make RPC calls to several servers (600+ ) and returns ScheduledJobs. The section of my code that...
5
by: Simon Harris | last post by:
Hi All, I am trying to call a method in a web form, from an event fired in a user control. My user control displays a map, which has a link button to enlarge/shrink the map. When the user...
2
by: Tom | last post by:
Let's say I have written a VB.NET user control, with the following components: MyControl.sln MyUserControl.vb (user control) Form1 (Windows Form) Form2 (Windows Form) Now, lets say that...
4
by: bill | last post by:
I have a Repeater control in a web user control. The web user control has a public method named PopulateRepeater which takes an ID as an parameter and populates the repeater control based on the...
1
by: Alec MacLean | last post by:
Hi, Outline of problem: I've built a set of user controls that are used to output questions for a survey and gather the responses using simple radio buttons. I'm adding an optional textbox...
2
by: sumanthsclsdc | last post by:
Hello friends, I have a problem, I implemented a class which uses tkinter and displays the window as required, the class will create a window with listbox and inserts some items into it, I...
8
by: Stinky Pete | last post by:
OK, I am thoroughly confused. All I am trying to do is fill in a Status field on my form with the condtions below, with all my theory being based on what I have read in various newsgropups. The...
8
by: Jeff | last post by:
Still new to vb.net in VS2005 web developer... What is the proper/standard way of doing the following - setting the value of a variable in one sub and calling it from another? E.g., as below....
11
by: briankirkpatrick | last post by:
Forgive me if my post seems a little amateurish... I'm requesting assistance from some of you smart folks out there to get the managed calls write that meet the specification in the esa.h for...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.