473,469 Members | 1,590 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Exec function from user control..

Hello,

I'm using ASP.net 2.0 with C#. I have a user control with 4 buttons on
it. I want to execute a function on the main form's code behind page from
the click event of the user control button. How do I do that?

Thanks.

Matthew Wells
Ma***********@FirstByte.net
Feb 7 '08 #1
3 1212
the user control could expose an event, or expose the button as a property to
the main form

-- bruce (sqlwork.com)
"Matthew Wells" wrote:
Hello,

I'm using ASP.net 2.0 with C#. I have a user control with 4 buttons on
it. I want to execute a function on the main form's code behind page from
the click event of the user control button. How do I do that?

Thanks.

Matthew Wells
Ma***********@FirstByte.net
Feb 7 '08 #2
Hi Mathews,

you can use delegate to raise event of the child control in the Main page.
Please refer to the link below to do this.

http://chiragrdarji.blogspot.com/200...l-to-main.html

Regards,
Manish
www.ComponentOne.com
"bruce barker" wrote:
the user control could expose an event, or expose the button as a property to
the main form

-- bruce (sqlwork.com)
"Matthew Wells" wrote:
Hello,

I'm using ASP.net 2.0 with C#. I have a user control with 4 buttons on
it. I want to execute a function on the main form's code behind page from
the click event of the user control button. How do I do that?

Thanks.

Matthew Wells
Ma***********@FirstByte.net

Feb 7 '08 #3
Thanks. It looks complicated, but I'll give it a try.

"Manish" <Ma****@discussions.microsoft.comwrote in message
news:73**********************************@microsof t.com...
Hi Mathews,

you can use delegate to raise event of the child control in the Main page.
Please refer to the link below to do this.

http://chiragrdarji.blogspot.com/200...l-to-main.html

Regards,
Manish
www.ComponentOne.com
"bruce barker" wrote:
>the user control could expose an event, or expose the button as a
property to
the main form

-- bruce (sqlwork.com)
"Matthew Wells" wrote:
Hello,

I'm using ASP.net 2.0 with C#. I have a user control with 4
buttons on
it. I want to execute a function on the main form's code behind page
from
the click event of the user control button. How do I do that?

Thanks.

Matthew Wells
Ma***********@FirstByte.net

Feb 8 '08 #4

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

Similar topics

0
by: Christian Rank | last post by:
Today I ran into problems when combining a C program with SQL statements with the ECPG interface of PostgreSQL: According to the documentation, it should be possible with EXEC SQL WHENEVER NOT...
4
by: Shailesh Humbad | last post by:
I was trying to exec a background process on XP using PHP CLI, but could not get it to work. Suppose the command I want to spawn off is "cmd". On *nix, it is as easy as putting ampersand "&" at...
5
by: TPJ | last post by:
I have the following code: ----------------------------------- def f(): def g(): a = 'a' # marked line 1 exec 'a = "b"' in globals(), locals() print "g: a =", a
4
by: Michael | last post by:
Hi, I'm having difficulty finding any previous discussion on this -- I keep finding people either having problems calling os.exec(lepev), or with using python's exec statement. Neither of...
4
by: =?ISO-8859-1?Q?Gregory_Pi=F1ero?= | last post by:
I'm curious why this code isn't working how I expect it to: import sys d=3 def func1(a,b,c): print a,b,c,d print sys.path exec "func1(1,2,3)" in {'func1':func1}
4
by: vol30w60 | last post by:
Hi folks, I am trying to launch a program with PHP code. I am running Apache on Windows XP SP2. I am using the method noted here: http://us2.php.net/manual/en/function.exec.php#59428 To...
7
by: JahMic | last post by:
I'm having a problem with exec on my hosting server. Unfortunately, the hosting support seems to be anything but helpful. The following works fine on my localhost: <?php $MaskData =...
31
by: eliben | last post by:
Hello, In a Python program I'm writing I need to dynamically generate functions and store them in a dict. eval() can't work for me because a function definition is a statement and not an...
11
by: Nadeem | last post by:
Hello all, I'm trying to write a function that will dynamically generate other functions via exec. I then want to be able to import the file (module) containing this function and use it in other...
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
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,...
1
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.